home *** CD-ROM | disk | FTP | other *** search
- > mtk had the perfect reasoning for why a compressed
- > filesystem like stacker is not desireable. The executable
- > files for unices are divided into page-size blocks to make
- > demand loading of binaries simple to implement. You
- > couldn't easily demand load a compressed executable
- > (imagine seek to specific offset in file, read 4K...).
-
- Not true.
-
- My idea of a compressed filesystem is based on the compressed virtual
- disk. That is, you make the disk surface itself look bigger than it
- really is (through compression) and run the regular BSD filesystem
- on top of it. Now, when you demand-load an executable, the page
- request gets mapped to a spot on the virtual disk. The virtual
- compression driver figures out the location of the physical page,
- brings it in to a buffer, and decompresses from the buffer into the
- requested page.
-
- Think about demand-loading a binary over NFS. What's the difference
- (structuarally) between a network protocol stack and a compressor?
-
- The virtual block size could be 8K (bigger is better). The underlying
- physical block ranges from 512 bytes to 8K, depending on the compressability
- of the contents of the virtual block. A virtual-to-physical block map
- must be maintained on disk by the virtual compression disk driver.
- This is not a simple linear mapping - the physical location of a virtual
- block must be stored in a table. Ideally, the physical location should
- mirror the logical location so as so minimize seeking when reading
- contiguous virtual blocks.
-
- In addition, the filesystem and virtual disk need to communicate so that
- minor inconsistencies and gotchas can be resolved. For example, if you
- write 100 virtual blocks to a disk with 1000 blocks free, do you get 900
- blocks left? Perhaps not. If the 1000 free blocks are physical * 8K
- blocks, then you may get more than 900 free blocks. The effect is that
- the virtual disk's size can vary over time. The BSD filesystem is meant
- for fixed-size disks.
-
-
- --
- David Jones, M.A.Sc student, Electronics Group (VLSI), University of Toronto
- email: dej@eecg.utoronto.ca, finger for more info
-
-