Input and output, disks and files
How devices raise interrupts and use DMA and buffers, how the arm of a disk is scheduled, and how file systems turn blocks into files with FAT, inodes and directories.
About 9 hours of study
Learning objectives
- Order interrupts by priority and use a ring buffer
- Compute the head movement of the disk-scheduling algorithms
- Follow a FAT chain and map a byte offset through an inode
Lessons
- 1
Input, output and interrupts Intermediate
How the CPU talks to devices: ports and memory-mapped I/O, polling and interrupts, DMA, priorities and nested interrupts, buffering, and device drivers.
- 2
Disks and disk scheduling
How a hard disk finds data (seek, rotation, transfer), the FCFS, SSTF, SCAN, C-SCAN, LOOK and C-LOOK algorithms, what changes with SSDs, and RAID.
- 3
File systems Intermediate
Files and directories, contiguous, linked (FAT) and indexed allocation, inodes and the biggest file they allow, free-space bitmaps, journaling and permissions.
- 4
Inodes, directories and links Intermediate
How UNIX file systems find a file: names in directories, inodes with direct and indirect pointers, mapping a byte offset to a block, path lookup, and hard and symbolic links.
Module practice
- Which interrupt firstEasy
- The keyboard bufferMedium
- Nested interruptsHard
- FCFS disk schedulingEasy
- Shortest seek firstMedium
- The elevator (SCAN)Hard
- Reading permission bitsEasy
- Following a FAT chainMedium
- A small FAT file systemHard
- Largest file an inode allowsEasy
- Which pointer holds this byteMedium
- Resolving a pathHard
Module quiz
‹ Memory: allocation, paging and virtual memoryFinal assessment ›