Android system porting and driving development case Chapter I.

Source: Internet
Author: User

Concept

As part of the system kernel, the driver works in a nuclear mindset while the application works in a user state. In other words, the program cannot directly pass the pointer, the data address of the user space to the kernel Linux kernel to divide the driver into 3 types: Character device, block device and network device. Character devices and block devices can be accessed like files. The main difference is not in the ability to seek, but in the way the system manages the two types of devices. Every I/O operation of the application for the character device is passed directly to the driver of the system kernel, and the operation of the application for the block device is managed by the system buffer and passed to the driver processing indirectly. This management of block devices is optimized for storage, while character devices are managed in a way that optimizes operations. As for the network device, it is a kind of special device in Linux system, it is not accessed by the corresponding device file node like character device or block device, and the kernel no longer accesses network device through calls such as read and write. Linux network system is mainly based on the BSD UNIX socket mechanism, between the system and the driver has a special data structure to transmit data, the system supports the sending and receiving cache of data, provide flow control mechanism, provide more protocol support.

In Linux systems, drivers are made into modules, the module. Simply put, a module provides a feature that can be loaded into the kernel space and unloaded from the kernel space at any time as needed. Therefore, kernel modules are designed to give the kernel dynamic additions and deletions, and are not limited to drivers.

I learned some basic things through this chapter and felt like I was getting started.

Android system porting and driving development case Chapter I.

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.