Linux kernel treats all devices as file; they can be opened, closed, read and written using the same standard system calls. For every kind of Block and Character Devices, system creates the device files using mknod command and they define the device as major and minor number.
?? what... major and minor number....
Don't worry, I am going to tell about major and minor number... ;-)
To access any device, Operating System must be told what to do. All the routines for the specific device is jointly referred as Device Driver.
All devices controlled by the same device driver have common MAJOR number. MINOR number is used to identify the different devices and their controllers.
In another language, it can be said that: MAJOR number tells what kind of device it is and MINOR number tells about the characterstics/location of the device.
http://www.linux-tutorial.info/modules.php?name=MContent&pageid=94
No comments:
Post a Comment