home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Professional / OS2PRO194.ISO / os2 / sysutils / ramdisk / pdnvdisk.doc next >
Text File  |  1992-01-08  |  7KB  |  174 lines

  1.                 PDNVDISK version 1.02
  2.                 8 January, 1992
  3.                 by: Peter Norberg, Consulting
  4.                         Compuserve ID 76260, 3355
  5.                         Phone: (314) 647-8487
  6.  
  7. The PDNVDISK.SYS subsytem is a simple, prototype OS/2 2.0 VDISK driver,
  8. designed to have a theoretical upper limit of 33 Megabytes of
  9. ram disk available for allocation.  It is installed and used
  10. IDENTICALLY to the IBM VDISK driver provided as part of OS/2 2.0,
  11. although it ignores the SECTOR SIZE argument defined by that driver.
  12.  
  13. The module PDNVDISK.SYS is placed in some convenient subdirectory,
  14. and then is loaded via a DEVICE statement in the CONFIG.SYS file.
  15.  
  16. NOTE:   IT IS STRONGLY RECOMMENDED THAT THE LOAD OF THE PDNVDISK DRIVER
  17.         BE THE LAST DEVICE DRIVER LOADED IN THE CONFIG.SYS FILE.  Since
  18.         it uses up a large amount of fixed memory (the amount requested,
  19.         plus some overhead to take into account the FAT and the base
  20.         directory), it can cause physical device drivers which actually
  21.         need memory in the low 16Meg of RAM to fail to load.
  22.  
  23.  
  24. WARNING!  THIS DRIVER IS NOT DESIGNED TO OPERATE ON ANY SYSTEM
  25.                 EXCEPT OS/2 2.0.
  26.  
  27.         If you need a driver for OS/2 1.1 through 1.3, or you need
  28.         abilities not present in this driver, please contact the author.
  29.  
  30. The format of the DEVICE statement is:
  31.  
  32.         DEVICE=<your.path>PDNVDISK.SYS NNNN SSSS DDDD
  33.  
  34. where all parameters (NNNN, SSSS, DDDD) are optional, and commas may be
  35. used to separate parameters (but are only needed if you want a parameter
  36. to retain its default value).  Any value outside of the legal parameter
  37. range maps into the corresponding limit, EXCEPT that 0 maps into the default
  38. value for that parameter.
  39.  
  40.         <your.path> is the drive and path to where PDNVDISK.SYS is stored
  41.  
  42.         NNNN is the number of Kbytes of RAM disk you want to have available
  43.                 after the allocation and initialization is complete.
  44.                 16 to 32640 is legal, which maps into
  45.  
  46.                         16     * 1024 = 16,384 bytes to
  47.                         32,640 * 1024 = 33,423,360 bytes
  48.  
  49.                 The default value is 64K.
  50.  
  51.         SSSS is a dummy parameter, which matches IBM's Sector Size parameter.
  52.                 In PDNVDISK, the sector size is fixed at 512 bytes.
  53.  
  54.         DDDD specifies the desired number of directory entries which are
  55.                 to be reserved.  The legal limits are 16 to 1024, and the
  56.                 actual amount available will be rounded UP to the next
  57.                 multiple of 16, minus 1 (i.e., the first entry is always
  58.                 used as the volume label entry, which is PDNVDISKnnn).
  59.  
  60. WARNING!  The test bed computer has only 16 Meg of RAM installed!
  61.           This code has never been tested by the author on large
  62.           memory machines!
  63.  
  64.  
  65. Thank you for being willing to test this code; please IMMEDIATELY post
  66. a message to me at my Compuserve address if you experience any problems!
  67.  
  68.  
  69. TECHNICAL DETAILS
  70.  
  71. PDNVDISK is currently at ALPHA test level.  It has been excercised on
  72. one machine (a 16 Meg 486), and found to experience no problems on
  73. any tested size RAM disk from 16K to 12 Meg.  It has NOT been tested at each
  74. of the possible RAM disk sizes (I do not have time to reboot the machine
  75. 16000 times), nor has it been tested at the 33 Meg (or any value above 12 meg)
  76. levels, despite the specifications, due to the test machine not having enough
  77. memory for such a test.
  78.  
  79. In its current form, the following Device Driver calls all report
  80. COMMAND errors:
  81.  
  82.         DD_READ_NO_WAIT
  83.         DD_QRY_INPUT_STATUS
  84.         DD_INPUT_FLUSH
  85.         DD_QRY_OUTPUT_STATUS
  86.         DD_OUTPUT_FLUSH
  87.         DD_DEINSTALL
  88.         DD_QRY_COUNT_DRIVES
  89.         DD_QRY_LOGICAL_UNIT_MAP
  90.         DD_SHUTDOWN
  91.         DD_QRY_DRIVER_CAPS
  92.  
  93. Only 2 DevIoCtl classes are supported:
  94.  
  95.         Categories 8 (disk IOCTL) and 90 (PDN Private)
  96.  
  97.                 CAT 8 FUNCTION          RESPONSE
  98.  
  99.                 0 (Lock Drive)          Processed as needed
  100.                 1 (Unlock Drive)        Processed as needed
  101.                 2 (Redermined Media)    Processed as needed
  102.                 3 (Set Logical Map)     OK -- action accepted, no remaps!
  103.                 4 (Begin Format)        ACCESS DENIED
  104.  
  105.                 20h (Block Removable)   Media is fixed
  106.                 21h (Get Map)           OK -- returns no remaps needed
  107.  
  108.                 43h (Set Device Par.)   ACCESS DENIED
  109.                 44h (Write Track)       INVALID COMMAND
  110.                 45h (Format Track)      ACCESS DENIED
  111.  
  112.                 60h (Media Sense)       INVALID COMMAND
  113.  
  114.                 63h (Get Device Par)    OK -- action performed as needed
  115.                 64h (Read Track)        INVALID COMMAND
  116.                 65h (Verify Track)      OK -- all tracks assumed valid
  117.  
  118.         All other FUNCTION codes within catagory 8 are reported as
  119.                 INVALID COMMAND.
  120.  
  121.         Category 90h is used privately by the code, as internal
  122.         diagnostic control.
  123.  
  124. Any other DevIoCtl catagory reports INVALID COMMAND.
  125.  
  126.  
  127. This program "believes" IBM's documentation, which claims (on page 3-2 of the
  128. preliminary draft of "OS/2 Physical Device Driver Reference", document
  129. number 10G6266, October 30, 1991),
  130.  
  131.         "Note:  Unlike the OS/2 Version 1.x operating systems,
  132.                 the OS/2 Version 2.00 device drivers always execute
  133.                 in protect mode".
  134.  
  135. If this statement is NOT true, I would fully expect some combination of
  136. DOS windows to be able to crash the code (my testing has not caused such
  137. a crash, however).
  138.  
  139. As a design goal, this code should be changed from using DevHlp_AllocPhys
  140. to using DevHlp_VMAlloc (since that gives you greater control over the
  141. memory allocated).  As of this version, that implementation remains
  142. elusive.
  143.  
  144. CHANGES FROM VERSION 1.01
  145.  
  146.         The DevIoctl subsystem should now be responding to everything
  147. which it needs to: that is to say, assuming you don't try to run NORTON
  148. on it to recover lost files, or that you don't try to format the drive,
  149. the subsystem should operate with all well-haved code using normal
  150. I/O requests.  It will NOT operate with code which tries to lock the
  151. drive and perform TRACK level I/O, so DISKCOPY and direct sector
  152. inspection utilities are not likely to operate correctly.
  153.  
  154.         An ERROR in 1.01 was detected and corrected.  The error caused
  155. a "COMMAND ERROR" to be reported if you tried to access the LAST sector
  156. of the VDISK.
  157.  
  158. ON A PERSONAL NOTE:
  159.  
  160. I would also appreciate anyone using this code to send me a message to
  161. tell me their thoughts about it, and to also give me ideas for "real"
  162. products which you need implemented for OS/2 2.0.  Although my company
  163. specializes in OS/2 Systems design, Device Drivers, and DSP Real Time
  164. Data Acquisition Control and Processing,  any ideas presented to
  165. me will not fall on deaf ears!  I appreciate your feedback, and value
  166. any suggestions which you can give me.
  167.  
  168.  
  169.         Peter Norberg
  170.  
  171.         President
  172.         Peter Norberg, Consulting
  173.  
  174.