lab 3 posted
will try to get assignment 3 out by end of week
no progress grading assignment 1
still accepting assignment 2 until Wednesday
filesystem as data structure
file control block (aka inode)
multiple filesystem types
directory: "special file"
hard vs. soft (symbolic) link
superblock
disk allocation
FAT: File Allocation Table
table at beginning of filesystem, one entry per block
pros & cons
FAT16
FAT32
ext2
| block size | max file size | max filesystem |
|------------|---------------|----------------|
| 1 kB | 16 GB | 4 TB |
| 2 Kb | 256 GB | 8 TB |
| 4 Kb | 2 TB | 16 TB |
| 8 Kb | 2 TB | 32 TB |
many (older) userland programs cannot handle files larger that 2 GB because they use 32-bit file positions
ext4
TODO: diagram
index block(s): per file
index block size
solution: multi-level indexed allocation
file metadata
atime
, ctime
, mtime
)index structure fast for small files, but supports large files
Calculations:
TODO: diagram
linked list
essentially: a memory management problem
RAID: Redundant Array of Inexpensive Disks
various schema:
Reed Solomon Algorithm
parity: even/odd
Hamming Code (7,4): use 7 bits to encode 4-bit "message"
method
example (7,4):
| bit 7 | bit 6 | bit 5 | bit 4 | bit 3 | bit 2 | bit 1 |
|------ |-------|-------|-------|-------|-------|-------|
| 111 | 110 | 101 | 100 | 011 | 010 | 001 |
|------ |-------|-------|-------|-------|-------|-------|
| a | b | c | p3 | d | p2 | p1 |
data bits checked by parity bits: unique data-bit error will be caught by at least 2 parity-bit errors and for each data bit, the parity-bit combination is unique
parity bits check data bits: unique parity-bit error means it cannot be a data-bit error because each data bit is covered by at least 2 parity bits
conclusion: