CS452 - Real-Time Programming - Spring 2010
Public Interest Announcements
Lecture 12 - Hardware Interrupts
What is an Interrupt?
In the CPU
- Test interrupt signal
- Change mode to IRQ
- Disable interrupt signal
- Execute instruction at 0x18
In the Interrupt Control Unit (ICU)
In the Peripheral Hardware
Context Switches for Interrupts
Difference from Software Interrupts
Assymmetry between User Task and Kernel
Scratch Registers
Two Link Registers
Helpful Features
- Trigger hardware interrupt from software
Kernel Provision for Interrupts
- Initialize the kernel with interrupts disabled
- Turn on interrupts by having user PSW with interrupts enabled
- First instruction of user task might not execute immediately
- Find source of interrupt
- Turn off source of interrupt
- In device
- In ICU
- PSR remains with IRQ disabled
- Handle interrupt
- Find waiting task
- Make waiting task READY
- Reschedule and activate
Three Free Choices
- Rescheduling
- Volatile Data
- Re-enabling interrupts
Return to: