Interrupt Service Routine
A bounded execution path invoked for an interrupt, typically subject to stricter latency and blocking constraints than ordinary thread code.
Role of an ISR
An interrupt service routine handles the latency-sensitive part of an interrupt event. Typical work includes reading device state, acknowledging or clearing a source, or placing data into a buffer/queue for later processing.
Why It Is Kept Bounded
Long computation, blocking I/O, contended locks or unnecessary dynamic allocation inside an ISR can increase latency. Depending on the platform, equal or lower-priority interrupts may also remain masked while the handler executes.
Heavy work is therefore commonly deferred to a task or normal thread context, leaving only the time-critical portion in the ISR.
Concurrency Boundary
If an ISR and ordinary code share data, volatile by itself is not a general synchronization mechanism. Atomicity, memory ordering and interrupt-masking rules have to be evaluated for the target architecture.