Why it matters: Exams ask this topic in two ways. Some questions are about numbers: the largest file an inode can address, the capacity of a disk from its geometry, the access time of one block, the total head movement of a scheduling algorithm. Others are about words: what a file is, what FAT is, which allocation methods exist, what an inode stores, why seek time matters. Every one of these ideas is taught below with its reason, and every number is worked out step by step.
Question (Sonali Bank and BDBL — Senior Officer (IT) — Exam: 25.09.2021 (AUST)): What is the maximum size of a file allowed in Linux with the following data: Block Size = 4KB, inode data pointer size = 4 bytes?
a) 1 TB
b) Less than 4TB
c) 2TB+2GB+2MB+64KB
d) More than 4 TB
You drag the slider of a lecture video to minute 37 and it plays from there at once. You open a folder with twenty thousand photos from a cousin's wedding and the thumbnails begin to appear. You press Delete on a 4 GB file and it disappears in a blink, yet copying the same file to a pen drive keeps you waiting for minutes. None of this is magic. Somewhere under the screen the operating system keeps a very careful set of books: which bytes belong to which file, in what order, in which places on a spinning metal disk, and how to fetch them without making the disk's arm run around for nothing.
This chapter opens those books. They have two halves. The first half is the file system, the part of the operating system that turns a raw row of disk blocks into files and folders that have names. The second half is disk scheduling, the question of what order to serve the requests that pile up for a mechanical disk, because that order decides how fast everything feels.