home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 6 File / 06-File.zip / ramfs102.zip / readme.txt < prev   
Text File  |  2002-10-21  |  9KB  |  224 lines

  1.  
  2. RAMFS - an IFS-based RAM Disk for OS/2 - Version 1.02.
  3. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  4.  
  5. Foreword by Karl Olsen
  6. ~~~~~~~~~~~~~~~~~~~~~~
  7. Some time ago I wanted to learn about Installable File Systems (IFSes) in OS/2,
  8. so I wrote RAMFS, an IFS-based RAM disk.
  9.  
  10. RAMFS is freeware. Feel free to use it, and to get ideas from the source code
  11. when you develop your own file systems. I developed RAMFS on OS/2 Warp 3.0,
  12. and have seen it work on OS/2 Warp 4.0.
  13.  
  14. RAMFS is a "remote file system" (as opposed to a "local file system") meaning
  15. that it isn't associated with a hard disk partition. Instead, drive letters
  16. are created through OS/2 calls. OS/2 doesn't know the internal data format in
  17. the file system - it only accesses the data through special file system
  18. functions.
  19.  
  20. Files are stored in RAM. This means that the data are lost when the system is
  21. rebooted. It is useful for holding temporary files - just let the TMP and
  22. TEMP variables point to a RAMFS drive, and your temp directory is
  23. automatically cleaned up at each boot.
  24.  
  25.  
  26. Features
  27. ~~~~~~~~
  28. o Create as many RAM drives as you want, using the drive letters that you
  29.   want 
  30.  
  31. o Size only limited by available RAM and swap disk space 
  32.  
  33. o Allocates swappable RAM from OS/2 as necessary when files are created, and
  34.   releases it again when files are deleted 
  35.  
  36. o Long file name support like in HPFS. Case isn't significant, but preserved 
  37.   like in HPFS. Files with long names are not visible from DOS and WINOS2 
  38.   programs. 
  39.  
  40. o Extended Attributes - up to 64 KB total for each file/directory 
  41.  
  42. o Intelligent RAM allocation algorithm - variable-length clusters provide
  43.   greater performance yet less system resources
  44.  
  45. o 3DNow!<TM> performance optimizations for AMD Athlon processor as well as
  46.   the Duron and AMD K6-2/K6-III.
  47.  
  48.  
  49. Non-features
  50. ~~~~~~~~~~~~
  51. o Does not support file locking functions (DosSetFileLocks()) 
  52.  
  53. o Does not support the DosFindNotify...() functions. I have never seen OS/2
  54.   use these functions. 
  55.  
  56. o Smaller files heavily consume system resources. For a typical OS/2
  57.   workstation, having more than 10000 files on RAMFS volume may lead to
  58.   premature exhaust of RAM handles.
  59.  
  60.  
  61. Installation and use
  62. ~~~~~~~~~~~~~~~~~~~~
  63. Add "IFS=d:\path\RAMFS.IFS" to CONFIG.SYS and reboot. During boot, it will
  64. show a short version message.
  65.  
  66. Then, from an OS/2 prompt, use RAMDISK.EXE to create a RAM drive. To create a
  67. drive R:, type "RAMDISK R:" To have a RAM drive created at every boot, you
  68. can add "CALL=d:\path\RAMDISK R:" to CONFIG.SYS.
  69.  
  70.  
  71. Advanced configuration
  72. ~~~~~~~~~~~~~~~~~~~~~~
  73. The following parameters may be supplied to RAMFS.IFS entry in the
  74. CONFIG.SYS:
  75.  
  76. o /Q = quiet initialization (suppresses the display of version notice)
  77.  
  78. o /S:<size> = preset the free space reported by RAMFS. Default is 64M,
  79.   however, if any applications complain about insufficient free space,
  80.   this parameter may be helpful. The default unit is bytes. Append the
  81.   value with 'K', 'M', 'G' or 'T' to scale accordingly. Examples:
  82.       /S:100000 = Report 100000 bytes (rounded down to 98304)
  83.         /S:355K = Report 355 kilobytes (rounded down to 352K)
  84.          /S:15M = Report 15 megabytes
  85.           /S:1G = Report 1 gigabyte
  86.           /S:1T = Report 1 terabyte
  87.   The granularity is 4K. Values above 2047M are not recommended (some
  88.   applications misinterpret larger values).
  89.  
  90. o /!3 = disable 3DNow!<TM>. Using the AMD 3DNow!<TM> instruction set
  91.   requires some modifications to the kernel code in memory. Use this
  92.   parameter if you experience any abnormal effects (none are known
  93.   so far).
  94.  
  95. o /3 = force 3DNow!<TM>. By default, if RAMFS fails to patch the
  96.   kernel, it disables the 3DNow!<TM> support regardless of your CPU
  97.   capabilities. You may enforce 3DNow!<TM> if you are unsure about
  98.   whether it has been enabled, and leave this option if nothing breaks.
  99.  
  100. Currently the 3DNow! initialization is deferred till the first use of
  101. RAMFS drive, hence the user is unable to see it during boot.
  102.  
  103.  
  104. Memory usage considerations
  105. ~~~~~~~~~~~~~~~~~~~~~~~~~~~
  106. The amount of free memory reported by RAMFS is a fixed value. (It isn't
  107. easy to get the amount of free virtual memory from a ring-0 file system.)
  108.  
  109. When an application creates (or grows) a file on a RAMFS drive, RAMFS.IFS
  110. allocates some swappable memory from OS/2. If this allocation fails, then
  111. RAMFS.IFS returns a "disk full" error code to the application. This
  112. mechanism has nothing to do with the value returned when an application asks
  113. for the amount of free disk space (which can be controlled with the /S
  114. parameter). So theoretically there is no risk involved in returning an
  115. arbitrary value for the free disk space.
  116.  
  117. Badly written applications might fail to check the return values from file
  118. write operations if they have just found out that there is plenty of free
  119. space. Applications should of course always check the return codes from all
  120. system calls.
  121.  
  122. And what happens when OS/2 runs out of physical memory and disk swap space?
  123. I am not sure that it checks the free space on the swap drive when virtual
  124. memory is allocated. It would then have to enforce that there always is at
  125. least as much free space on the swap drive as the amount of virtual memory
  126. that could potentially need to be swapped out. And consequently it would
  127. have to return "disk full" to applications that tried to create files on the
  128. swap drive if that would cause the free space to drop below the enforced
  129. minimum. I don't think that OS/2 does this.
  130.  
  131. So practically, I think that you should be careful about exhausting virtual
  132. memory. When you experiment about what happens when you try to fill a RAMFS
  133. drive, don't have important unsaved data in open applications :-)
  134.  
  135.  
  136. Source code
  137. ~~~~~~~~~~~
  138. RAMFS.IFS was originally written in Borland C++ 3.1 and Turbo Assembler 3.1.
  139. Yes, Borland C++ happily compiles 16-bit code for OS/2. Starting with
  140. version 1.02, it has been migrated to IBM DDK environment (Microsoft C v
  141. 6.0). To rebuild DDK, register for it (it is free) at:
  142.  
  143. http://techsupport.services.ibm.com/ddk/
  144.  
  145. RAMDISK.EXE is a small and simple 32-bit utility. You should be able to 
  146. recompile it with any 32-bit OS/2 compiler. The enclosed copy was built
  147. with IBM C Set++ v 2.1.
  148.  
  149. One may downgrade the code easily to the official 1.01 release by using
  150. "rollback.gz" patch:
  151.  
  152. gzip -dc<rollback.gz|patch -p0
  153.  
  154. (gzip and GNU Patch are to be present on PATH).
  155.  
  156.  
  157. History
  158. ~~~~~~~
  159. The development path of this public-domain utility, due to independent
  160. participation of various developers, is quite scattered. See the enclosed
  161. RAMFS.GIF for better understanding of various branches.
  162.  
  163. 1998-01-03: (without version number). Initial release by Karl Olsen.
  164.  
  165. 1998-12-05: RAMFS64. The only modification is reporting 64M free space.
  166. Released by Jack Stein.
  167.  
  168. 2002-03-21: RAMFS64 Performance Update. Changed memory allocation algorithm
  169. to avoid performance penalties associated with moving the same data back
  170. and forth. This version was developed by Andrew Belov.
  171.  
  172. 2002-04-14: Version 1.01. No big changes. Released by Karl Olsen and
  173. Stewart Buckingham. Version 1.01 does NOT contain the aforementioned
  174. performance patch. Here is the original change log:
  175.  
  176. o Added a version number :-), the boot message, and the /Q switch.
  177.  
  178. o Fixed a bug that showed up when doing wildcard searches from 32-bit
  179.   programs, in particular Jonathan de Boyne Pollard's 32-bit Command
  180.   Interpreter. Strange things happened if you specified an exact filename
  181.   to a command that allowed wildcards. 
  182.  
  183. o Changed the amount of free space and total space reported to OS/2 from 1 MB
  184.   to 64 MB. Some programs don't like to write large files to a drive that 
  185.   apparently only has 1 MB free. A test version, ramfs64.zip, with just this
  186.   change has been floating around for some time. 
  187.  
  188. o Added the RCOPY program. 
  189.  
  190. 2002-10-21: Version 1.02 Performance Update. This is a merger of the
  191. previous two releases, released by Andrew Belov. Summary of changes:
  192.  
  193. o Removed RCOPY (made obsolete by the performance patch).
  194.  
  195. o Moved to Microsoft C v 6.0 and the DDK build environment.
  196.  
  197. o Implemented AMD 3DNow!<TM> block copy code as per AMD technical note
  198.   #22007. Added a kernel patch module and command-line parameters
  199.   (/3, /!3) to control 3DNow!<TM>.
  200.  
  201. o Added /S command-line parameter to set the free space amount reported
  202.   by RAMFS.
  203.  
  204.  
  205. Distribution package
  206. ~~~~~~~~~~~~~~~~~~~~
  207.   README.TXT  : This file
  208.   RAMFS.GIF   : Graphical supplement :-)
  209.   RAMFS.IFS   : The Installable File System driver
  210.   RAMFS.SYM   : Symbolic information for debugging
  211.   RAMDISK.EXE : Utility to create RAM disk drives
  212.   SRC\*.*     : Source code to RAMFS.IFS, RAMDISK.EXE, and RCOPY.EXE
  213.  
  214.  
  215. Contacting the authors
  216. ~~~~~~~~~~~~~~~~~~~~~~
  217. This version was released by Andrew Belov <andrew_belov@newmail.ru>
  218.  
  219. Original RAMFS author:
  220.  
  221. Me   : Karl Olsen
  222. Email: kro@post3.tele.dk
  223. www  : http://karl.myip.org
  224.