(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