Unlike most other operating systems, Unix doesn't allow user programs to access hardware directly under most circumstances. This method of protecting the integrity of the system provides a stability that is not found in many other operating systems. Windows is famous for its Direct X technology which allows devices to directly access hardware. This direct access from user programs leads to contentions and conflicts over hardware resources and is a leading cause of system crashes.

In Unix, drivers are either statically compiled into the kernel itself, are loaded dynamically at bootup, or loaded when hardware is inserted on large systems with hot-swap capability. When a driver is loaded, it is given a major and minor number as part of the filesystem name. The major number indicates which driver is being used and the minor number indicates which instance is being used. The major and minor numbers allow a single driver to be used to open multiple devices by simply using a separate instance of the driver for each similar device. For example, two ATAPI CD-ROMs would have the same major number, but different minor numbers.

Drivers are usually stored on the system in a well hidden location, (often in /devices with symbolic links in /dev ) and use a very cryptic naming system. Often, symbolic links are made to these files, and these symbolic links use names that are easier to remember, but no less cryptic. When a Unix system wishes to access a device, it actually uses the file system to talk to that device. This is different from Windows systems which allow programs to talk (almost) directly to the hardware.

Unix uses two types of drivers: raw, and block.


These drivers access a device character by character, sector by sector. These are also referred to as character drivers.


These drivers access a device at a higher level, pulling in whole chunks of data at a time.

Bookmark this page and SHARE:  


Support InetDaemon.Com

Get Tutorials in your INBOX!

Free Training

Free Training