9.3 Interrupts Flashcards
What is an interrupt
Async signal. Ie not occuring at specified time, hence special mechanism to deal with
How does the CPU detect interrupts
- There is a special interrupt input wire
- Interrupt checking step in instruction cycle (usually just before execute)
- External interrupt controller used to prioritise interrupts
How does the CPU handle interrupts (ie what steps does it need to do)
- Store PC and data on stack
- ‘Jump’ to interrupt handler
- Return back to current program.
What architectural support can be put in place for interrupts
- SPC register (save program counter)
- Pre-defined interrupt addresses
- Status bit for interrupts
What is the relation between the kernel and the wider operating system.
Provides core functionality for OS, scheduling IO, system calls. Is itself a program.
What are software interrupts
Like hardware interrupts but controlled by kernel. System calls etc.
What are timing interrupts
Time-slicing to share processor between multiple programs
How does the kernel scheduler work
- Has queue of programs to schedule
- When programs need to await something can start another
- Otherwise time-slicing, interrupts etc.
- When program is rescheduled is placed at back of queue
What are some example interrupts for the kernel scheduler