Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Interrupt handler
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== Divided handlers in modern operating systems == In several operating systems{{mdashb}}[[Linux]], [[Unix]],{{cn|date=June 2023}} [[macOS]], [[Microsoft Windows]], [[z/OS]], [[DESQview]] and some other operating systems used in the past{{mdashb}}interrupt handlers are divided into two parts: the '''First-Level Interrupt Handler''' ('''FLIH''') and the '''Second-Level Interrupt Handlers''' ('''SLIH'''). FLIHs are also known as ''hard interrupt handlers'' or ''fast interrupt handlers'', and SLIHs are also known as ''slow/soft interrupt handlers'', or [[Deferred Procedure Call]]s in Windows. A FLIH implements at minimum platform-specific interrupt handling similar to ''interrupt routines''. In response to an interrupt, there is a [[context switch]], and the code for the interrupt is loaded and executed. The job of a FLIH is to quickly service the interrupt, or to record platform-specific critical information which is only available at the time of the interrupt, and [[Scheduling (computing)|schedule]] the execution of a SLIH for further long-lived interrupt handling.<ref name="lwn-ldd3" /> FLIHs cause [[jitter]] in process execution. FLIHs also mask interrupts. Reducing the jitter is most important for [[real-time operating system]]s, since they must maintain a guarantee that execution of specific code will complete within an agreed amount of time. To reduce jitter and to reduce the potential for losing data from masked interrupts, programmers attempt to minimize the execution time of a FLIH, moving as much as possible to the SLIH. With the speed of modern computers, FLIHs may implement all device and platform-dependent handling, and use a SLIH for further platform-independent long-lived handling. FLIHs which service hardware typically mask their associated interrupt (or keep it masked as the case may be) until they complete their execution. An (unusual) FLIH which unmasks its associated interrupt before it completes is called a [[reentrant (subroutine)#Reentrant interrupt handler|reentrant interrupt handler]]. Reentrant interrupt handlers might cause a [[stack overflow]] from multiple [[preemption (computing)|preemption]]s by the same [[Interrupt vector table|interrupt vector]], and so they are usually avoided. In a [[Interrupt priority level|priority interrupt]] system, the FLIH also (briefly) masks other interrupts of equal or lesser priority. A SLIH completes long interrupt processing tasks similarly to a process. SLIHs either have a dedicated [[Kernel (operating system)|kernel]] thread for each handler, or are executed by a pool of kernel worker threads. These threads sit on a [[run queue]] in the operating system until processor time is available for them to perform processing for the interrupt. SLIHs may have a long-lived execution time, and thus are typically scheduled similarly to threads and processes. In Linux, FLIHs are called ''upper half'', and SLIHs are called ''lower half'' or ''bottom half''.<ref name="tldp-lkmpg" /><ref name="lwn-ldd3" /> This is different from naming used in other Unix-like systems, where both are a part of ''bottom half''.{{clarify|date=July 2020 |reason= This begs the question: on those other systems, what does "upper half" mean, if it means something different than Linux systems?}}
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)