Driver Development--"character device, block device Introduction" "Sky original"

Source: Internet
Author: User

Drive development

  character devices, block devices, network devices  character Deviceaccessed as a byte stream,cannot be accessed randomlywith the exception, the video card, EEPROM can be randomly accessed EEPROM can be erased 100 million times, is a character device, can be randomly accessedread/write is direct access to hardwareFlash Erase Times Limited, 1 million times, easy to have bad block  Block Devicescan be accessed randomlyAccess as a "block" unitblock size is typically 512 bytesthe size of the block is determined by the hardwareis the basic unit of the kernel for data transfer  HDD Structure:The formatted partition is a cylinder, that is, the cylinder of the hard diskIf there are 10 faces, there are 10 cylinders for embedded Devicesif it is flash, the structure is as follows:Flash is in block unitssome are pages, and there are many blocks per page character devices and block devices use different interfaces at all,that is, two kinds of architectures block Devices can also be driven by the architecture of a character device's driver, but this is inefficient  character devices typically have direct access to hardware to read data  block devices typically go through the system cache to read dataFor example, the old U-disk has just passed the movie, the direct unplug may not be able to read the movie, or run a problem, this is because the writing is written in the cache, and then asynchronously written to the hardware  Linux is the exception to all files, network equipment in Linux is not reflected in the fileoperation is accessed by socket sockets  Network devices receiving requests from outside the world (outside the system)  How to install the driver:1. Directly compile the kernel2. Manual Installation when needed  

Sina Blog: http://blog.sina.com.cn/u/2049150530
Blog Park: http://www.cnblogs.com/sky-heaven/
Know: Http://www.zhihu.com/people/zhang-bing-hua

     

Driver Development--"character device, block device Introduction" "Sky original"

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.