Docsity

Unix i-Nodes and Indexed Allocation: File System Organization and Consistency, Slides of Advanced Operating Systems

Partial preview of the text

Download Unix i-Nodes and Indexed Allocation: File System Organization and Consistency and more Slides Advanced Operating Systems in PDF only on Docsity!

  • Lecture No.

Consistency problem?  The Big File System Promise: persistence

  it will hold your data until you explicitly delete it(and sometimes even beyond that: backup/restore)

 What‟s hard about this? Crashes  If your data is in main memory, a crash destroys it.

 Performance tension: need to cache everything. But if so,then crash = lose everything.

 More fundamental: interesting ops = multiple block modifications, but can only atomically modify disk a sector at a time.

Indexed Allocation: Brings all pointers together into the

index block.

index table

UNIX: All disks are divided into five parts …  Boot block   Superblock ^ can boot the system by loading from this blockspecifies boundaries of next 3 areas, and contains head of  i-node area  freelists of i-nodes and file blockscontains descriptors (i-nodes) for each file on the disk; all i-nodes  File contents area  are the same size; head of freelist is in the superblockfixed-size blocks; head of freelist is in the superblock  Swap area  holds processes that have been swapped out of memory

 A later version of Bell Labs Unix utilized 12 direct pointers ratherthan 10

 Berkeley Unix went to 1KB block sizes  What‟s the effect on the maximum file size?

 256x256x256x1K = 17 GB

 Suppose you went 4KB blocks?  1Kx1Kx1Kx4K = 4TB

i-node Format  User number

   Group numberProtection bitsTimes (file last read, file last written, inode last written)

  File code: ordinary user file, or a “special file” (typically an I/O device) Size: length of file in bytes specifies if the i-node represents a directory, an

  Block list:Link count: locates contents of file (in the file contents area) number of directories referencing this i-node