Tip: Choose Save as PDF in the print dialog to download. Use A4 paper size.
Shade in the A or B circle for each question.
Draw a line connecting each item on the left to its match on the right.
| Left column | Right column | |
|---|---|---|
| 1OS interrupt handling | AIF newInterrupt.priority > current.priority THEN run newInterrupt.ISR | |
| 2OS selects ISR | BThe OS receives each interrupt, picks the right ISR to run, manages priorities, then passes control back to the interrupted program so it can carry on. | |
| 3The OS manages priorities: if a higher priority interrupt arrives, it is handled before a lower priority one. | CThe application does not choose the ISR. The operating system receives the interrupt and selects the correct ISR. | |
| 4After the ISR has finished, the OS passes control back to the interrupted program so it carries on from where it stopped. | DCALL ISR RESTORE state RESUME program | |
| 5After the ISR ends, the OS restarts the interrupted program from the very beginning. | EWhen an interrupt arrives, the operating system chooses the correct interrupt service routine to deal with that particular interrupt, such as the keyboard ISR for a key press. | |
| 6The keyboard sends an interrupt and the application program picks the ISR to run. | FThe OS does not restart the program. It restores the saved state and resumes the program from the point where it was interrupted. |
Complete each line of code by filling in the missing parts.
Shade in the letter of the line that contains an error.
OS interrupt handling — The OS receives each interrupt, picks the right ISR to run, manages priorities, then passes control back to the interrupted program so it can carry on.IF interruptFlag = TRUE THEN
CALL OSHandler
ENDIFIF source = "keyboard" THEN
CALL keyboardISR
ENDIFIF newPriority > currentPriority THEN
CALL higherISR
ENDIFCALL keyboardISR
RETURN TO interruptedProgramREPEAT
CALL nextISR
UNTIL queueEmpty