Interrupts and Scheduling
Interrupts and Scheduling
Polling
Interrupts
Polling
The Bluetooth system which connects your phone to your car so it knows when
it disconnects
Interrupts
Stacks use a last in first out structure (LIFO)
Interrupts are when a device sends a signal to the CPU asking for attention
The OS has an interrupt service routing (ISR) which deals with this and with what happens
next
At the end of each FDE cycle the CPU checks if any interrupts have been signalled – if they
are of a higher priority than the job it’s doing it jumps to that interrupt.
-Interrupts,
The contents of the PC (and other registers) are pushed onto the system stack
The interrupt service routine (ISR) is started by pointing the PC to the ISR location
When finished, the register contents are taken from the stack (popped) and put back into
registers, including the original value of the PC
If the interrupt is of equal or lower priority than the current process then the process is
completed
If the interrupt is of higher importance than the current process then the CPU completes its
current FDE cycle.
Then the contents of the PC (and other registers) are pushed into the system stack
The interrupt service routine is started by pointing the PC to the ISR location
While one interrupt is being dealt with, another more important one can occur
Then the current register values are placed onto stack – That’s the current state if the first
interrupt
The address if The new ISR is loaded into the PC AND EXECUTION CONTINUES FROM
THERE(this can carry on)
Types of interrupts
Hardware
-Power button
- Memory error
- Memory refresh
Software:
Illegal instruction
Explain whether the following image represents paging or segmentation. Use the phrases within
your answer.
Paging- Memory is split into physical divisions, not logical like in segmentation. Also there is no
consideration of logic of the program when creating divisions which again shows it is paging and
the divisions or pages are the same size, again showing its paging
Explain whether the following image represents paging or segmentation. Use the phrases within
your answer.
Segmentation
1. It represents