The relationship between Linux device driver and the whole hardware system

Source: Internet
Author: User

The relationship between Linux device driver and the whole hardware system

1, the classification and characteristics of equipment

The hardware of a computer system is mainly composed of CPU, memory and peripherals.

With the development of IC (Integrated circuit) production process, the chip integration is more and more high, often in the CPU internal integrated memory and peripheral adapter.

The driver targets the memory and peripherals (including internal CPU-integrated memory and peripherals) rather than CPU cores.

1.1 Equipment Classification and characteristics

Linux divides memory and peripherals into 3 basic classes:

Character devices: Refers to devices that must be accessed sequentially in serial order.

Does not go through the system's fast cache.

Block devices: can be accessed in any order, one unit for the operation.

The system's fast cache.

Network device: is designed for packet reception and delivery, and does not correspond to the node of the file system.

The communication between the kernel and the network device is completely different from the way the kernel and character devices and block devices communicate.

However, character devices and block devices do not have significant boundaries, such as for Flash devices, which conform to the features of block devices, but we can still use it as a character device to access.

2, Linux device driver and the whole hardware and software relationship

1, in addition to network devices, character devices and block devices are mapped to the Linux file system files and directories, through the file system's system call Interface open (), write (), read (), close () and so on to access character devices and block devices. All character devices and block devices are presented uniformly to the user.

A block device is more complex than a character device, where it first establishes a disk/flash file system (an organization that defines the files and directories on the storage media).

The application uses the Linux system call interface programming, but can also use C library functions, for the purpose of code portability, we recommend the use of C library functions.

Figure 1, as follows:

    • This article is from: Linux Learning Tutorial Network

The relationship between Linux device driver and the whole hardware system

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.