Organize your linux--block devices, character devices every day.

Source: Internet
Author: User

block Device (Blockdevice) is a random access device with a certain structure , the reading and writing of this device is block-based, he uses buffer to hold temporary data, when the condition is ripe, Write from the cache one time to the device or from the device to a single read-out into a buffer, such as a disk and file system

character device (Characterdevice): This is a sequential data flow device in which read and write is performed by character, and these characters are continuously formed into a data stream. He does not have buffers, so the reading and writing of such devices is real-time, such as terminals, tape drives and so on.

Devices in the system that can randomly (and do not need to sequentially) access fixed-size data slices (chunks) are called block devices, which are called blocks. The most common block devices are hard disks, and in addition, there are many other block devices, such as floppy drives, CD-ROM drives, flash memory, and so on.

Kernel management block devices are much more nuanced than managing character devices, and the issues to consider and the work done are much more complex than character devices. This is because the character device only needs to control one location-the current position-and the location where the block device accesses must be able to move around the different intervals of the media. So in fact the kernel does not have to provide a specialized subsystem to manage character devices, but the management of block devices must have a dedicated subsystem to provide services. Not only because the complexity of the block device is much higher than the character device, the more important reason is that the block device has a high performance requirement, and the performance of the whole system is improved by the use of every single part of the hard disk, the effect is much larger than the keyboard throughput speed.

Organize your linux--block devices, character devices every day.

Related Article

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.