Revise Computingrevisecomputing.co.uk
Free student revisionSee questionsFor schoolsSchool enquiry
Free revisionSee questionsFor schoolsSchool enquiry
Knowledge/A Level/H446/01 Computer systems/Systems Software/Interrupts, Interrupt Service Routines…

Interrupts, Interrupt Service Routines (ISR) and their role in the FDE cycle

Interrupts, the role of interrupts and Interrupt Service Routines (ISR), role within the Fetch-Decode-Execute Cycle

1.2.1 Systems Software

Practise exam questions

Systems Software — Note 3 of 8

Candidates need to understand the purpose of interrupts within a computer system, why an interrupt might be generated and what happens within the CPU and memory in order to call an interrupt service routine.

What you need to know

An interrupt is a signal to the processor that something needs its attention. The processor finishes its current instruction, saves its state and runs an Interrupt Service Routine (ISR) to deal with the event, then resumes the original task.

What to know

  • A higher-priority interrupt can interrupt an ISR, which is why a stack is used: states are restored in reverse order.

Key terms

Exam tipCommon mistake

Interrupt

A signal sent to the processor by hardware or software indicating that an event needs immediate attention.

  • Sources of interrupts: hardware (key pressed, printer out of paper), I/O completion, timer (a time slice has ended), software errors (division by zero), power failure.
  • Interrupts have priorities. Only an interrupt with a HIGHER priority than the current task causes it to be suspended.
  • The processor checks the interrupt register at the END of each fetch-decode-execute cycle.
  • If an interrupt is waiting, the contents of the registers (including the PC) are pushed onto a stack so the current task can be resumed later.
  • Common mistake: Saying the current instruction is abandoned. The processor finishes the current FDE cycle before handling the interrupt.
Interrupt Service RoutineISR

A section of code that runs to deal with a particular interrupt.

  • The address of the appropriate ISR is loaded into the PC, and the ISR runs.
  • When the ISR finishes, the saved values are popped from the stack back into the registers and the original task continues where it left off.
  • Exam tip: Describe the sequence in order: check at end of cycle, compare priority, save registers to the stack, load the ISR address into the PC, run the ISR, restore registers.

Ready to test yourself?

Practise 1.2.1 questions
← Previous noteMemory management: paging, segmentation and virtual memory1.2.1 Systems SoftwareNext note →Scheduling: round robin, FCFS, multi-level feedback queues, SJF and SRT1.2.1 Systems Software

Back to Systems Software

Systems Software

Note 3 of 8

  1. 1The need for, function and purpose of operating systems
  2. 2Memory management: paging, segmentation and virtual memory
  3. 3Interrupts, Interrupt Service Routines (ISR) and their role in the FDE cycle
  4. 4Scheduling: round robin, FCFS, multi-level feedback queues, SJF and SRT
  5. 5Distributed, embedded, multi-tasking, multi-user and real time operating systems
  6. 6BIOS
  7. 7Device drivers
  8. 8Virtual machines: executing intermediate code and running one OS within another
Topic overview