home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / os / os2 / apps / 9908 < prev    next >
Encoding:
Internet Message Format  |  1993-01-06  |  3.5 KB

  1. Path: sparky!uunet!inmos!wraxall.inmos.co.uk!frogland!des
  2. Newsgroups: comp.os.os2.apps
  3. From: des@inmos.co.uk (David Shepherd)
  4. Subject: Re: better vdisk
  5. Message-ID: <1993Jan6.112111.20918@wraxall.inmos.co.uk>
  6. X-Newsreader: TIN [version 1.1 PL8]
  7. References: <726270245snx@tgm.CAM.ORG>
  8. Date: Wed, 6 Jan 93 11:21:10 GMT
  9. Lines: 59
  10.  
  11. Eric Trepanier (eric@tgm.CAM.ORG) wrote:
  12. : In article <1993Jan5.144041.15093@wraxall.inmos.co.uk> des@inmos.co.uk writes:
  13. :  > Jussi M Peltoniemi (jpeltoni@niksula.hut.fi) wrote:
  14. :  > : Is there better vdisk than the one that comes with os/2 2.0?
  15. :  > : I mean vdisk that is swappable
  16. :  > isn't this counter-productive. the whole idea of a vdisk is that the
  17. :  > files are in memory and not on a (slow) disk. making it swapable will
  18. :  > just chuck the files back out to disk.
  19. : Uh-uh.  I've seen this on the Amiga and it is brilliant.  Most of the time,
  20. : a virtual disk is empty -- it is best used to hold temporary files.  Thus,
  21. : when the disk is particulary big (4Mb+), and empty, you litteraly end up
  22. : wasting that precious memory.  Now, an intelligent RAM disk (like those
  23. : found on the Amiga) will only "dynamically" allocate  memory as it needs
  24. : it.  This can be real-RAM memory (as opposed to swappable disk memory).
  25. : When the files are deleted from the RAM disk, the memory is released thus
  26. : the RAM disk never wastes more system (RAM) memory then is needed to hold
  27. : all its files, i.e. 0Kb when it's empty.  I've never seen such a RAM disk
  28. : on a PC-based system though, whether DOS-based or OS/2-based.
  29.  
  30. Thinking about, i can see what you mean and that it would be useful ... 
  31. What you describe sort of sounds like the TMPFS filing system under
  32. SUNOS where the /tmp directory dynamically takes space out of the
  33. swap partition. (so that occasional big temporary files don't need
  34. a large amount of rarely used space on disk).
  35.  
  36. A dynamic vdisk could be useful. However it wouldn't be as fast as a
  37. dedicated vdisk as when data was written to it there would always be
  38. the possibility that something would have to be swapped out of physical
  39. memory to make space for an expansion in the vdisk - This could lead to
  40. major thrashing problems if an app writing data to a swap file was
  41. constantly being swapped out by each write! However, using a sensible
  42. quantisation of the space claimed when it was needed (i.e. if the vdisk
  43. gets full claim an extra 500k) then this could be ok. Some similar
  44. mechanism to the swapper file could be used to slowly shrink the
  45. vdisk as space becomes available (again with a rule to always leave
  46. say 500k free).
  47.  
  48. Using this you could have a vdisk that was no slower than a physical
  49. disk and which would, probably, be much quicker.
  50.  
  51. One concern with this, though, is that we can end up with vast levels
  52. of caching which may not all interact together well as 
  53.  
  54. writing to 
  55. 1) the dynamic vdisk which may write to 
  56. 2) the swap file which may put data in
  57. 3) the OS/2 disk cache which may write data to disk which goes into
  58. 4) the smart disk controller board cache which eventually goes into
  59. 5) the disk drives cache which eventually goes into
  60. 6) the disk
  61.  
  62. I think 3) doesn't apply as I've read that OS/2 doesn't cache the swap file
  63. and 5) probably doesn't as I think disk drives only cache read data, but
  64. who knows what people will think of next.
  65.  
  66. --------------------------------------------------------------------------
  67. david shepherd: des@inmos.co.uk                     tel: 0454-616616 x 625
  68.                 inmos ltd, 1000 aztec west, almondsbury, bristol, bs12 4sq
  69.                 New Year Resolution for 1993: Start using capital letters.
  70.