
The Ziggy filesystem (we came up with the name while watching the movie Vibes) is designed to be as dynamic as it can be, without causing too many headaches. Basically, the project specifications (up to the 95% level) specify everything to be handled statically in memory. The 95-100% level specs (which Ziggy is designed to handle) are such that the project will be much more like an actual filesystem, including the requirement that the program interface with a file on disk which in the project's view is a disk. However, the project specifications are also limited to mostly static parameters (block size=256 bytes/block, maximum of 30 entries per directory, 1024 blocks on the disk, etc.) Ziggy was designed with the premise that since the above is possible, a little extra work would allow for completely dynamic values for the above parameters.

To make things a little more efficient, we've designed in a write-cache, based on the read cache. Basically, whenever new data is added to the cache, the oldest entry has to be removed (assuming a full cache.) Each cache entry will have the actual data in the cache (i-node or directory), an identifier (i-nodes have the i-node number, directories have the corresponding i-node number), and also a modified flag. When the oldest entry is removed, the modified flag is examined. If set, the data is written out to disk. The theory goes like this:
Our Read-Write Cache - Worst Case Scenario: The first 10 changes will only have to read from the disk. The cache will store the data. After the cache is filled, then all changes will require the same number of disk access as the Read-Only Cache.
However, the Average Case for Read-Only is the same as the Worst Case (Read and Write per change). The Average Case for the Read-Write Cache though is much better as changes will most likely be to the same i-node/directory, so the cache can just change it's data without needing to write anything to the disk.