The device driver model
There are different subsystems in the kernel, such as the system call interface, VFS, process and memory management, and the network stack. Throughout this book, we’ve strictly kept our focus on the structures and entities that are a part of the I/O hierarchy in Linux. However, in reality, the process of reading and writing data to a storage device has to pass through most of these subsystems. As we saw, abstraction layers are the alpha and omega of the I/O stack, but this abstracted approach is not just limited to storage devices. For the kernel, the disk is just one of several pieces of hardware that it must manage. If there was a unique subsystem for managing the different types of devices, it would result in a bloated piece of code. Of course, different types of devices tend to be treated differently, as they might have contrasting roles, but for the end user, there should be a general abstract view of the system structure.
To achieve this unification...