This is not the current version of the class.

Lecture 11

(Including notes by Thomas Lively)

Front matter

Interesting bugs in the pset?

Logistics

File system disk structures

Disks

How to tell how big block size is?

Write amplification = writes turn into bigger writes

Disk Contents

How to find "hello.txt"?

// on disk
struct filesystem {
    struct file {
        char name[200];
        char data[1000000];
        size_t size;
    } f[10000];
};

Issues:

Good things:

Suggestions:

Fix slow lookup: add a directory file type

Fix low utilization: 1. Extent based FS

Let's invent FAT (File Allocation Table)

How to find free blocks?

Suggestions:

New idea: Free block bitmap + indirect blocks

Next class: Correctness in file systems!

Further reading

Modern Operating Systems by Andrew S. Tanenbaum. §4.3 and §4.4.1 cover file system structure and design. Early sections in Chapter 5 make a good introduction to buses, controllers, and general hardware devices. Tanenbaum does not really cover SSDs (flash memory) or write amplification.

Operating Systems in Depth by Thomas W. Doeppner. Today’s material is covered in Chapter 6. §6.5 briefly covers write amplification.

Reading for Thursday

Tanenbaum: §4.3.6 (Journaling File Systems) and §4.4.3 (File System Consistency).

Doeppner: §6.2.