Lesson 4.7.3.6
4.7.3.6 Interrupts Quiz: AQA Computer Science, Unit 7
20 questions
In partnership with Revision Ninja
Lesson 4.7.3.6, Interrupts: 20 multiple choice questions for the AQA Computer Science (7517), Unit 7: Fundamentals of computer organisation and architecture, written with Revision Ninja.
Host it live on the board and students join with a game code on their own devices, or revise alone with Free Play. The answers are revealed in the game.
The 20 questions
-
What is an interrupt?
- A command that clears the status register so that all of the flags are reset to their default values for the next task
- A fault in the system clock that stops every instruction from running until the computer is restarted by the user
- A message sent from main memory that the processor must store in its general-purpose registers for later use
- A signal that tells the processor to pause the current task and deal with an event that needs attention
-
What is an interrupt service routine (ISR)?
- A routine that the processor runs to handle a particular interrupt
- A routine that disables all interrupts until the computer is next restarted
- A part of the control unit that generates the clock pulses for the processor
- A routine that writes the interrupt request into secondary storage for later review
-
Where does the processor typically check for interrupts in the fetch-execute cycle?
- In the middle of an ALU operation, so that the calculation can be interrupted
- Only during the decode stage, after the CIR has been loaded with the instruction
- Only before the first instruction of a program, when the power is switched on
- After an instruction has finished executing, before the next fetch
-
Why must the processor save the volatile environment when it services an interrupt?
- So the interrupted program can resume exactly where it left off, with its registers and PC restored
- So the MBR can hold the ISR's code permanently while the interrupted program waits
- So the ISR can overwrite the program counter without ever needing to return
- So the interrupt can be cleared from the status register automatically by the hardware
-
Which items form part of the volatile environment that is saved on an interrupt?
- The ISR's machine code, which is stored in read-only memory
- The PC, the status register and the contents of the general-purpose registers
- The hard disk's directory of files, which is held on the drive
- The clock circuit and its crystal oscillator, which keep the timing
-
Which event is a typical example of something that generates an interrupt?
- The program counter is incremented by one after each instruction is fetched
- A key is pressed on the keyboard, or a timer reaches its set value
- The ALU completes an addition and stores the result in a register
- The processor fetches the next instruction from main memory in sequence
-
What is the effect of an interrupt on the normal fetch-execute cycle?
- The cycle runs twice for every instruction, once to execute and once more to check the interrupt line for any requests
- The cycle skips the fetch stage for every remaining instruction of the program until the interrupt has been fully cleared
- The processor diverts to the ISR and then returns to the interrupted point, so the cycle is temporarily changed
- The cycle stops permanently and does not resume until the user restarts the computer manually from the power switch
-
Which statement about the order of events when an interrupt is handled is correct?
- The state is restored before the ISR begins so that the ISR can use the previous values
- The program is restarted from its first instruction after the ISR finishes its work
- The ISR runs first and the state is saved afterwards in every case, to save time
- The state is saved, the ISR runs, the state is restored, and the interrupted program continues
-
Why are interrupts useful to a computer system?
- They remove the need for secondary storage, because data is always kept in memory
- They let the processor respond to events such as input without continually checking each device
- They allow every program to run at the same clock speed as the others
- They make main memory non-volatile, so that data is kept after the power is switched off
-
A keyboard interrupt occurs while a program is running. Which register must be saved so the program can later resume at the right instruction?
- The hard disk controller's register
- The clock's crystal frequency register
- The printer's status register
- The program counter
-
What is the reason the processor must save the status register during an ISR?
- Because the status register stores the address of the ISR in main memory so that the processor can jump there directly
- Because the status register stores the machine code of the ISR so that it can be fetched again the next time it is needed
- Because flags set by the interrupted program's last operation could otherwise be lost or overwritten
- Because the status register holds the clock speed that the ISR needs to read before it can safely change any value
-
A computer receives 50 interrupts per second, and each ISR takes 2 ms. What fraction of processor time is spent in ISRs?
- 2%
- 100%
- 50%
- 10%
-
Why is it important for an ISR to be short?
- A short ISR lets the program counter skip instructions in the main program safely
- A long ISR delays the interrupted program and any other interrupts that are waiting to be serviced
- A short ISR runs from the hard disk instead of main memory, which is faster for the processor
- Only short ISRs are able to save the status register, so long ones lose flag values
-
What does an ISR typically do once the interrupt has been serviced?
- Deletes the interrupted program from secondary storage to free up space
- Sets the clock to zero and waits for the next interrupt before continuing
- Restores the saved registers and returns control to the interrupted program
- Clears main memory so that the program can restart from a clean state
-
After a timer interrupt is serviced, which register tells the processor where to resume?
- The current instruction register, which holds the code of the ISR itself
- The memory buffer register, which holds the last data item that was read
- The memory address register, which holds the current value of the timer
- The program counter, which holds the address of the next instruction
-
Why is the processor's state described as a 'volatile environment' when an interrupt occurs?
- The registers and flags can change at any time during execution, so they must be saved when the interrupt occurs
- The environment is stored in ROM, so it cannot be changed by the interrupt at any point
- The environment is stored in volatile RAM only, so it is lost whenever the power is switched off
- The environment refers to the operating system's files, which are deleted during each interrupt
-
Which statement about interrupts compared with polling is correct?
- Interrupts require the processor to check every device on every clock cycle without a break, which uses up processor time
- Interrupts let a device signal the processor when it needs attention, rather than the processor repeatedly checking it
- Polling is faster because the processor never checks any device at any point, so no time is spent on checks at all
- Polling and interrupts are identical methods that differ only in the name given to them by the manufacturers of devices
-
What is the first step when the processor accepts an interrupt?
- The current state of the processor, such as the PC and the registers, is saved
- The ISR's code is decoded into the CIR as the first action of the response
- The status register is cleared to zero before anything else is done by the processor
- The clock is reset to its initial frequency before any other action is taken
-
An interrupt arrives during the execute stage of an instruction. When is it normally serviced?
- Immediately, in the middle of the ALU's calculation, without finishing the instruction
- At the next power cycle, because the execute stage cannot be interrupted at all
- During the next fetch, after the instruction has been partly decoded by the control unit
- After the current instruction completes, at the next point where interrupts are checked
-
An ISR uses registers R1 and R2. What must happen to their values in the interrupted program?
- They are saved before use and restored before the processor returns to the interrupted program
- They are copied into the status register, where they are held during the ISR
- They are overwritten and not restored, because the ISR runs in its own separate space
- They are cleared to zero and then passed to the MBR as data for the ISR
Related quizzes
- Data types Quiz · 4.1.1.1 · 20 questions
- Entity relationship modelling Quiz · 4.10.1.1 · 20 questions
- Big Data Quiz · 4.11.1.1 · 20 questions
- Function types and first-class objects Quiz · 4.12.1.1 · 20 questions
- Analysis Quiz · 4.13.1.1 · 20 questions
- Data structures and abstract data types Quiz · 4.2.1.1 · 20 questions
- Breadth-first and depth-first search Quiz · 4.3.1.1 · 20 questions
- Problem-solving and algorithms Quiz · 4.4.1.1 · 20 questions
- Natural, rational, irrational and real numbers Quiz · 4.5.1.1 · 20 questions
- Programming concepts: sequence, selection and iteration Quiz · 4.1.1.2 · 20 questions