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

Lessons

  1. 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. 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. 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. 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

Module quiz

1. Which part of a disk read is usually the slowest?
2. What does the interrupt vector hold?
3. The head is at 53 and the requests are 98, 37 and 65. What is the SSTF order?
4. Where is a file's name stored in a UNIX file system?
5. A block holds 256 pointers and the inode has 10 direct pointers. How many data blocks can the single indirect pointer add?
6. A FAT has fat[4] = 7, fat[7] = 2, fat[2] = -1. A file starts at block 4. Which blocks does it use?

‹ Memory: allocation, paging and virtual memoryFinal assessment ›