People new to Linux often hear that it has excellent support for all kinds of cards and that the device drivers are stable and fast. Sometimes, though, setting up devices under Linux is often not all plug-and-play.
Everything is a file
Many modern operating systems have a method for installing special files to make hardware work. On the Apple Mac, for instance, the drivers for the hardware devices are usually special files that go in the System Extensions folder. Linux also has special files that it uses to control the hardware.
Linux device drivers work through special kernel code that directly accesses the hardware. To make the services that the card or other device offers available to normal user programs, the kernel uses the special files in /dev
One end of the file in /dev
can be opened normally and the other end is attached to the kernel. That is of course an oversimplification, but I think you get the general idea: hardware, kernel, special file, user program and the same path back from user program to hardware. There are two forms of the kernel portion of this equation: compiled-in drivers that are coded in permanently when the kernel is built, and modules.
Another much-trumpeted advantage of Linux is that it does not need to be rebooted as often as other operating systems. You might think that this is due to its rock solid stability. You may think I am now going to talk about the quality of the device drivers. But you’d be wrong. The reason that Linux device drivers lead to less rebooting is that we can reconfigure, load or unload them without restarting the system.
To do this modular kernel drivers are used.
How to load a module
Most people configure their modules at install time and then leave them alone. All the major distributions have taken to modules because of another advantage they have: size. Distribution makers want to support all the possible cards and devices that Linux can. If we compiled all these into the kernel it would be huge. If several different static kernels for different devices were supplied then they would take up too much space, as well. With the modular system distribution makers supply a stripped down kernel plus a comprehensive set of device drivers. This typically only occupies two or three floppy disks in total.