The K-Zone: File handling in the Linux kernel
This series of articles attempts to explain in detail what happens
in the Linux kernel when applications read and write files. It is
quite ambitious in scope, covering the whole process from the
C-language calls that manipulate files, through the standard C library,
the VFS layer, filesystem handlers, block devices, and right
down to the code that
wiggles the voltages on the pins of the disk controller. Although there
are no shortage of general overviews available
of the Linux kernel and its organization,
and although
there's lots of detail around about how specific pieces of code work, there
doesn't seem to be available a single document that ties everything
together. At least until now.
These articles are intended for people who want to write Linux
kernel modules for file, filesystem, or block device management.
They may be of value to
developers who are interested in other areas of the Linux kernel,
as they touch on memory management, device drivers, interrupt
handlers, and system calls in general. They all assume a general
familiary with Linux, a working knowledge of C, and an understanding
of the general principles of operating system design.
Linux is available for many different machine architectures; even
within a particular architecture there are different version of the kernel
in widespread use. At the time of writing (January 2004) the first non-test
version of the 2.6.0 kernel had just been announced. These articles are
based on late versions of 2.4 kernel series (2.4.18 and later). Some of
the content will be relevant to earlier or later kernels, but some won't.
I have tried to avoid getting into architecture-specific details wherever
possible; but where it was impossible to avoid I have taken examples
from the x86 architecture,
that being what I'm most familiar with.
Comments, criticisms, and suggestions welcome; please send them
to the usual place.
Next: introduction
©1994-2006 Kevin Boone, all rights reserved