home *** CD-ROM | disk | FTP | other *** search
/ Amiga GigaPD 3 / Amiga_GigaPD_v3_3of3.iso / netbsd / docs / mailinglist-archive / 1993-12 / text0105.txt < prev    next >
Encoding:
Text File  |  1993-06-25  |  2.0 KB  |  44 lines

  1. > mtk had the perfect reasoning for why a compressed
  2. > filesystem like stacker is not desireable.  The executable
  3. > files for unices are divided into page-size blocks to make
  4. > demand loading of binaries simple to implement.  You
  5. > couldn't easily demand load a compressed executable
  6. > (imagine seek to specific offset in file, read 4K...).
  7.  
  8. Not true.
  9.  
  10. My idea of a compressed filesystem is based on the compressed virtual
  11. disk.  That is, you make the disk surface itself look bigger than it
  12. really is (through compression) and run the regular BSD filesystem
  13. on top of it.  Now, when you demand-load an executable, the page
  14. request gets mapped to a spot on the virtual disk.  The virtual
  15. compression driver figures out the location of the physical page,
  16. brings it in to a buffer, and decompresses from the buffer into the
  17. requested page.
  18.  
  19. Think about demand-loading a binary over NFS.  What's the difference
  20. (structuarally) between a network protocol stack and a compressor?
  21.  
  22. The virtual block size could be 8K (bigger is better).  The underlying
  23. physical block ranges from 512 bytes to 8K, depending on the compressability
  24. of the contents of the virtual block.  A virtual-to-physical block map
  25. must be maintained on disk by the virtual compression disk driver.
  26. This is not a simple linear mapping - the physical location of a virtual
  27. block must be stored in a table.  Ideally, the physical location should
  28. mirror the logical location so as so minimize seeking when reading
  29. contiguous virtual blocks.
  30.  
  31. In addition, the filesystem and virtual disk need to communicate so that
  32. minor inconsistencies and gotchas can be resolved.  For example, if you
  33. write 100 virtual blocks to a disk with 1000 blocks free, do you get 900
  34. blocks left?  Perhaps not.  If the 1000 free blocks are physical * 8K
  35. blocks, then you may get more than 900 free blocks.  The effect is that
  36. the virtual disk's size can vary over time.  The BSD filesystem is meant
  37. for fixed-size disks.
  38.  
  39.  
  40. -- 
  41. David Jones, M.A.Sc student, Electronics Group (VLSI), University of Toronto
  42. email: dej@eecg.utoronto.ca, finger for more info
  43.  
  44.