Linux device drivers: Top half and bottom half of interrupt processing

Source: Internet
Author: User

http://blog.csdn.net/yuesichiu/article/details/8286469

The interruption of the device interrupts the normal scheduling and operation of processes in the kernel, and the system's quest for higher throughput is bound to require that the interrupt service program be as concise as possible. However, this good desire often does not coincide with reality. in most real systems, when interrupts arrive, the work to be done is often not short, and it may take a lot of time to process.

         to find a balance between breaking execution time as short as possible and breaking processing to complete a lot of work,linux  breaks the interrupt handler into two halves: the top half (top  half) and the bottom half (bottom  half). Less, you can complete directly in the top half.  

         Linux System Implementation . linux interrupt handling is divided into two halves, the top half handles emergency hardware operations, and the bottom half is not tight urgent time-consuming operation . Tasklet and work queues are good mechanisms for the bottom half of the dispatch interrupt, Tasklet is based on the soft throughput performance, Sleep waits are usually recommended in situations where the latency requirement is not very precise.

( 1) tasklet but all tasklet

(2) Work queue , it may have a higher delay, but allow hibernation. The work runs in the context of a particular kernel process.

Linux device drivers: Top half and bottom half of interrupt processing

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.