Operating system--io Caching technology

Source: Internet
Author: User

First, why the introduction of caching technology

In order to solve the problem of CPU speed and external device speed mismatch.

Reduces the number of IO interrupts to the CPU. Each IO device takes a long time, so the data is put into the buffer before the IO operation.


Second, the implementation of buffer technology

Classification of buffers:

(1) Set the buffer in the device

(2) setting buffers in memory

If the data is read, the disk's data is read into the memory buffer of the operating system kernel through DMA, then the process is read again.


III. IO with cache and non-cached IO

IO operations with no cache:

In the Linux operating system, read (), write (), and other system calls are non-cached IO operations, which write bytes in the application process to the kernel buffer, and then call the Fsync () function to synchronize to disk.

Io operation with cache:

In the application process, there is also a file buffer, until the buffer fills up, then call Read (), write () and other system calls, put the data into the kernel buffer.


Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

Operating system--io Caching technology

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.