Cards (15)

  • What is the role of interrupts in a computer system?
    They signal the processor that attention is needed.
  • What does the fetch-decode-execute cycle involve?
    It involves the processor fetching, decoding, and executing instructions repeatedly.
  • How can you think of an interrupt in a classroom analogy?
    Like a student raising their hand to signal the teacher for attention.
  • How does the fetch-decode-execute cycle change with interrupts?
    It includes an additional step to check for new interrupts after executing instructions.
  • What is an interrupt service routine (ISR)?

    It is a program with its own set of instructions to handle an interrupt.
  • What happens to the program counter when an interrupt occurs?

    It changes to point to the address of the first instruction of the interrupt.
  • What is the purpose of the stack in handling interrupts?

    It saves the current values of registers for later retrieval.
  • What happens when an interrupt is completed?
    The values from the stack are popped back into the registers to resume the original program.
  • What occurs if a higher priority interrupt comes while another interrupt is being executed?

    The current interrupt is suspended, and the new interrupt is executed.
  • What is the priority of interrupts compared to standard programs?
    Interrupts have a higher priority than standard programs.
  • What is a typical scenario where an interrupt is necessary?
    When the computer becomes unresponsive and requires user intervention.
  • What is the consequence of not handling interrupts properly?
    The processor may become unresponsive and unable to resolve issues.
  • What causes an interrupt to the CPU?
    Devices and applications requiring the processor's attention.
  • What are the steps involved in handling an interrupt?
    1. Current register values are saved onto the stack.
    2. The program counter is updated to point to the ISR.
    3. The ISR is executed.
    4. After completion, values are retrieved from the stack.
    5. The original program resumes execution.
  • What are the categories of interrupts that might be relevant for an exam?
    • Hardware interrupts
    • Software interrupts
    • Timer interrupts
    • I/O interrupts