Rio File System

Goal

  • Reliability of disk (write-through)
  • Performance of memory (RAM-disk)

Solution

Protect memory

There are two distinct buffers in memory. Directories, symbolic links, inodes and superblocks are stored in the traditional Unix buffer cache. Regular files are stored in the Unified Buffer Cache (UBC).

To protect the file cache, we use exsiting memory protection techniques. The write-permission bits are turned off in the page table for file cache. File cache procedures must enable the write-permission bit before writing a page and disable writes afterwards.

This requires that all addresses are mapped through the TLB, so no access to physical address directly will be allowed.

Warm reboot

Use the UPS to prevent memory from losing data. It read the file cache contents that were present in physical memory before the crash and update the file system with this data.

Registry is an additional data structure to help find, identify and restore the files in memory.

3 types of crash

  • Flip random bits in the kernel address space
  • Change individual instruction in the kernel text
  • Imitate programming errors in the kernel

2 types of corruption

  • Direct corruption, use checksum
  • Indirect corruption, use MemTest