A few days ago, when learning Android often encounter XXXX node, so now refer to: http://blog.csdn.net/Bestrem_9/archive/2009/03/19/4004335.aspx (there are other documents) will summarize the concept of node is as follows:
The concept of a node is required for device management.
There are two types of devices in Linux: character devices (unbuffered and sequential access only) and block devices (with buffering and random access ). Each character device and block device must have the primary and secondary device numbers. devices with the same primary device number are similar devices (using the same driver ). Among these devices, some devices are abstract to the physical hardware that actually exists, while some devices are functions provided by the kernel itself (not dependent on specific physical hardware, it is also called "Virtual Device "). Each device has a corresponding file (node) under the/dev directory ). You can run the CAT/proc/devices command to view the master device Number of the currently loaded device driver.
Certificate ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
In a system, a hardware description is usually used as a term for a device, including disks, printers, video cards, and keyboards. When FreeBSD is started, most devices can be detected and displayed. For more information, see/Var/run/dmesg. boot, All information is in the Guide.
For example,Acd0Is the first ide cd device, andKbd0It indicates the keyboard.
In UNIX operating systems, most devices have special access files called device nodes./DevDirectory.
After adding a new device to the system or compiling the support of additional devices into the kernel, you must create a device node for it.
Certificate ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
When we first wrote a Linux Device Driver, we often used the mknod command to manually create a device node. In fact, the Linux Kernel provides us with a set of functions, it can be used to automatically create a device node in the/dev directory when the module is loaded, and delete the node when the module is detached. Of course, the prerequisite is that the user space is transplanted with udev.
Certificate ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Finally, you must understand the concept of nodes in device management and driver writing.