As with any UNIX os,device files are located in the /dev directory in the
root file system.Device files represent the user-level process "handle" into
the device drivers that control various hardware devices on the system.The device drivers are each assigned a major number is an offset into one of two tables,known as the switch tables,that define the operations that permissible on the devices.We have 2 switch tables:
1.for character devices
2.for block devices.
As we know,it's possible to have a single device with both a character device file and a block device file associated with it,but those operations that are supported are different,and thus the code to perform those operations is also different.
(1) br------ 2 root root 0,21 Feb 12 15:40 /dev/dsk15
crw-rw-- 2 root root 7,21 Mar 7 09:29 /dev/rdsk15
SAME device accessed through buffer cache (c) or raw (r)
The offset is the same for the two special files
The access method does not change the content of the blocks that are read,
using the character device read the transfer goes directly to the user space, whereas
using the block device there is a double copy (to the buffer cache, and from this buffer ti the user buffer).
Each device special file in Tru64 UNIX is assigned a unique 32-bit device number(dev_t in <sys/types.h>)that consists of the combination of the major and minor numbers.
Major number:for any device special file is an offset into the bloc or character switch table.This is how the os determines which driver to associate with that device.
Minor number:a driver specific number that the driver uses to find a particular device of that class.
(File system)Some file systems are used on local data storage devices; others provide file access via a network protocol (for example, NFS, SMB, or 9P clients). Some file systems are "virtual", in that the "files" supplied are computed on request (e.g. procfs) or are merely a mapping into a different file system used as a backing store. The file system manages access to both the content of files and the metadata about those files.
The BIOS (/