File System Simulation

CSC-264 · Semester IV · Operating Systems

File System & Block Allocation

Navigate the directory tree and watch files land on disk blocks.

//
readme.md blocks
todo.txt blocks

Disk blocks (32 × 4 KB)

1 free fragments
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31

On-disk files

boot.sys(3 blocks)blocks 02
kernel.bin(6 blocks)blocks 38
user.db(4 blocks)blocks 912
doc.txt(2 blocks)blocks 1314
media.mp4(5 blocks)blocks 1519

Trade-offs

Contiguous is fast but suffers external fragmentation. Linked allocation uses free blocks anywhere but each block carries a pointer. Indexed allocation needs one index block per file but supports direct random access.