OS-Device Management in Unix

One of the design objectives of Unix was to provide a straight forward uniform system for I/O operations. From the kernel’s view point, all devices and files are treated identically. Devices are represented as special files which appear as entries with in the disk directory system. This means that data transfer operations to and from a process are identical for both data files and other devices such as printers. The other main feature of the Unix I/O system is that all data transfers between a process and a file or device are handled purely as a stream of bytes with no structure.

The /dev directory on a Unix disk system holds a list of special files which corresponds to the devices attached to the system. A listing of these device names could be obtained by the command $ ls – l /dev

A list of ome device names is shown below

         /dev/console              system console
         /dev/ttyo1                  user terminal 1
         /dev/ttyo2 -                user terminal 2
         /dev/rmt 0 -                magnetic tape
         /dev/dsk/0s0 -            hand disk

Normal filename within a directory associated with some data stored on disk, /dev directory is associated with a device driver.

Device drivers in Unix

Device drivers in Unix are usally linked into the object code of kernel. This means that when a new device is to be used, which was not included in the original construction of the os, the Unix kernel has to be re-linked with the new device driver object code.
Share this article :
 
Copyright © 2012. Best Online Tutorials | Source codes | Programming Languages - All Rights Reserved