Introduction to direct I/O mechanism in Linux

Source: Internet
Author: User

Introduction to direct I/O mechanism in Linux

Introduction to direct I/O mechanism in Linux

 

Huang xiaochen, software engineer, IBM Huang xiaochen, and IBM System Z automation technical support software engineer.

 

Introduction:For traditional operating systems, common I/O operations are usually cached by the kernel. Such I/O is called cache I/O. The file access mechanism described in this article is not cached by the operating system kernel, and data is directly stored on disks and applications.ProgramAddress Space for transmission, so the file access mechanism is called direct I/O. Linux provides such a file access mechanism. For applications that store I/O cached in the user's address space, direct I/O is a very efficient method. This article will discuss the design and implementation of direct I/O Technology in Linux based on Kernel 2.6.18.

Release date:December 30, 2010
Level:Elementary
Access:20644 views
Comment: 2 (View | add comments-Log On)

Average score (35 scores)
Score for this article

 

Motivation for direct I/O

Before introducing direct I/O, this section describes why direct I/O occurs, that is, the shortcomings of traditional I/O operations.

What is cache I/O (buffered I/O)

Cache I/O is also referred to as standard I/O. Most file systems use cache I/O by default. In Linux's cache I/O mechanism, the operating system will cache the I/O data in the file system's page cache, that is, the data is first copied to the buffer zone of the operating system kernel before it is copied to the address space of the application from the buffer zone of the operating system kernel. Cache I/O has the following advantages:

    • Cache I/O uses the operating system kernel buffer, which isolates the application space from the actual physical device to a certain extent.
    • Cache I/O can reduce the number of disk reads and improve performance.

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.