Storage in layers, each bigger and slower than the one above it. This lesson builds the bottom layers: the cabinet that holds files, and what it is made of.
Before you start. A file is bytes, a numbered record called an inode (its size, owner and where its bytes sit), and a name in a directory that points at that number. A save first lands in the page cache in RAM, and a journal is a notebook where the file system writes a change down before making it, so a crash leaves each change done or not done (The drawer that says it saved). A program never touches the disk. It asks the kernel, the one program with full access to the hardware, through a system call (Processes, Threads & the Kernel). The disk is slow and sits on the far side of a bus (I/O, Interrupts & the Bus). The program holds only a small number, a file descriptor, and uses the same open, read, write and close for everything (Everything is a file descriptor).
Lesson 26 of 41 in How Computers Work
The rest of this lesson is part of a plan.
A plan opens every lesson, board, video, lab and paper on chalk. Yearly is $39/year.