Linux Summary application of six drive device block device interrupt

Source: Internet
Author: User

(i): Interrupt of block device:

Interrupt function: the REQUEST_IRQ () function links the interrupt service subroutine of the block device driver to the specific interrupt request line.

The interrupt procedure for the driver's interrupt service subroutine is as follows:

(1): The user process emits a different type of input or output request (read () system call), perhaps first

Through high-speed buffer storage, the actual device input/output is ultimately required.

(2): Call the device driver's read () function, or the Requset () function to complete the input/output

The action instruction is sent to the hard device, and now the device driver waits for the operation to occur.

(3): Some time later, the hard device is ready to complete the specified operation, and generates an interrupt signal to mark the occurrence of the event.

(4): Interrupt signal causes the interrupt service subroutine that invokes the driver, which copies the required data from the hard device to the device driver's

Memory buffers and notifies the waiting read () or request () function that the data is now ready for use.

(5): When the data is available, the read () or request () function can now provide the data to the user process, the interrupt

The process is simplified, but reflects the main aspects of the process.

(6): If the interrupt Service subroutine needs to change some data structure, and the other parts of the kernel also need to change these data structures.

(7): When a hard device input/Output request occurs, the driver's read (), write (), and request () functions do

Linux Summary application of six drive device block device interrupt

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.