Handling Updates in the File Cache
1. Blocks may be modified in memory once they have been brought into the cache.
Modified blocks are dirty and must (eventually) be written back.
2. Once a block is modified in memory, the write back to disk may not be immediate (synchronous).
- Delayed writes absorb many small updates with one disk write.
How long should the system hold dirty data in memory?
- Asynchronous writes allow overlapping of computation and disk update activity (write-behind).
Do the write call for block n+1 while transfer of block n is in progress.
- Thus file caches also can improve performance for writes.