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 | |
|---|---|---|
| 1result = 10 / 0 | AA key press is a hardware interrupt, because it comes from a hardware device. A software interrupt comes from a program or the processor. | |
| 2open("notes.txt") | BProcess A writes to address 5000 while Process B writes to address 5000 | |
| 3Two processes trying to use the same memory location at once cause a software interrupt | CCPU fetches the instruction 11111111 (not in the instruction set) | |
| 4The processor raises a software interrupt when it meets an instruction it cannot run | DA running program divides by zero, so a software interrupt is generated | |
| 5A software interrupt is sent by a keyboard when a key is pressed | EA program asks the operating system for a service, which causes a software interrupt | |
| 6A software interrupt means the program keeps running and the error is ignored | FA software interrupt makes the CPU pause the process so the error or request can be handled first. |
Complete each line of code by filling in the missing parts.
Shade in the letter of the line that contains an error.
software interrupt — A signal sent to the CPU by a program or the processor itself when a process hits an error (e.g. divide by zero, invalid instruction) or needs an OS service, so the CPU pauses it.result ← 10 / 0
// CPU sends a software interruptIF divisor = 0 THEN
// CPU sends a software interrupt
ENDIFCALL PrintFile(report)
// Program requests a service from the OS// Process A writes to address 500
// Process B writes to address 500
// Same memory location causes an interruptinstruction ← "ZZZ"
// The CPU cannot run an invalid instruction