All mock tests are FREE till 31 December — register to save your progress

Arrange the following levels of interrupt protection within the Linux Kernel in order of increasing priority:
(A) user mode programs
(B) bottom half interrupt handlers
(C) kernel system service routines
(D) top half interrupt handlers

Pick an option to check yourself, or open the answer below.

Show answer & explanation

Correct answer: B. (A), (C), (B), (D)

Explanation

In Linux, ordinary user-mode programs (A) have the lowest priority because they can be preempted by any kernel activity. Code running in the kernel on behalf of a process (a system service routine, C, i.e. a system call) ranks next, since it executes in process context and can itself be interrupted by hardware. Bottom-half handlers (B) (deferred/soft-interrupt work such as softirqs or tasklets) run above process-context kernel code because they must finish the work a hardware interrupt triggered. Top-half handlers (D) sit at the very top because they are the primary ISR that runs immediately with interrupts typically disabled, so nothing else can preempt them. This gives the increasing-priority order A, C, B, D, option (ii).

More System Software and Operating System questions