ECE243 Practice Question Website


Main Assembly Programming Input/Output Memory Computer Architecture Advanced Topics

Input/Output Questions





Question 9

The following are steps the CPU takes in an interrupt. Put the steps in order and write down the order below. We realize there are several correct answers and getting just one of them will suffice.

  1. CPU: completes the current instruction
  2. CPU: grants the interrupt for the device
    1. sends interrupt acknowledge to the device (IACK)
  3. ISR: Restore saved registers from the stack and executes return from exception instruction
  4. CPU: must save the state of the cpu before servicing the interrupt (pushing on the stack)
    1. current PC
    2. condition codes (CCR of status register)
  5. Program: CPU configures device for interrupts
  6. Device: sends a vector number to the cpu
  7. CPU: figures out what ISR to run
    1. uses vector to look up the address of that routine in the interrupt vector table
  8. CPU: Executes ISR
  9. CPU: return to point of execution where interrupted
  10. Program: CPU makes a request from device, and works on something else while waiting
  11. ISR: Saves Registers onto the stack (Callee Save) and execute
  12. Device: when device is ready, it sends an interrupt request to the cpu
  13. CPU: temporarily disables other interrupts
  14. CPU: restores PC and CCR

Answer

One order: EJL -> AB -> BFG -> M -> HKCNI There are 3 sequences here that can come in any order. So, for example, F must come after B and before G but can come before or after M, A and D. Similarly M can come at any time as long as it is after L and before H.