Comment on page
XV6 VS Real World
Buffer cache serves the same 2 purposes as real-world ones: 1. Caching 2. Synchronizing access to the disk
Xv6 uses a linked list, and LRU. Modern buffer caches uses hash table for lookups and a heap for LUR evictions. Modern buffer caches are integrated with virtual memory system to support memory-mapped files.
In xv6, A commit cannot occur concurrently with file-system system calls. In other words, if log is committing, other system calls are blocked and wait.
In xv6, logs recorded the entire block, even if only one byte is changed.
It performs synchronous log writes, a block at a time.
Real logging system address all of above issues.
The same with xv6 and real world.
The most inefficient part of the file system layout is the directory, which requires a linear scan over all the disk blocks during each lookup.
Real world uses on-disk balanced tree of blocks.
Hard. Xv6 does not support combining many disks into a single logical disk.
Lack of snapshot, and incremental backup.