Year 11 Exam  >  Year 11 Notes  >  Computer for GCSE/IGCSE  >  Interrupts

Interrupts | Computer for GCSE/IGCSE - Year 11 PDF Download

Interrupts

  • Computers utilize the fetch-decode-execute cycle in the CPU to repeatedly execute instructions. However, during this process, external devices may need to send signals to the CPU to temporarily halt its current operations (interrupt) for specific tasks. For instance, a user might initiate Ctrl+Alt+Delete to launch the task manager or request a document to be printed.
  • These interruptions must ensure that the CPU halts its current task to address the incoming request. Interrupts are directed to a designated area known as the interrupt service routine.

Two Types of Interrupt

  • Hardware Interrupt:
    • Occurs due to a hardware device failure, like pressing a key on the keyboard or moving the mouse.
  • Software Interrupt:
    • This type of interrupt occurs when an application halts or requests services from the operating system. Examples include a program not responding, division by zero, or two processes attempting to access the same memory location.
    • An instance of a program becoming unresponsive.
    • Encountering a division by zero situation.
    • Two processes vying to access identical memory locations.

Registers in the CPU

  • Within the CPU, there exist registers that currently hold data being processed. These registers are crucial during ongoing operations.
  • Examples of such registers include those responsible for storing temporary variables, memory addresses, or data needed for arithmetic operations.
  • Registers like the program counter (PC) keep track of the current position in code execution.
  • Data registers hold operands or results of operations.

Computer Registers

  • Program Counter: The program counter indicates the memory address of the next instruction to be fetched.
  • Current Instruction Register: The current instruction register holds the instruction currently being executed.
  • Memory Address Register: The memory address register stores the location in RAM where data is stored or will be sent.
  • Memory Data Register: The memory data register stores the actual data from or to be sent to a specific RAM location.

The Interrupt Service Routine

  • When an interrupt is triggered, the Interrupt Service Routine (ISR) is a set of instructions that need to be executed to handle the interrupt.
  • For instance, if a device sends a signal to the processor, indicating an interrupt, the ISR takes over to process this event.

Register Handling During Interrupt

  • Registers, which store temporary data within the processor, must be adjusted to deal with the interrupt.
  • When an interrupt occurs, the current register values are temporarily saved to memory (RAM) in a designated storage area called a stack.

Execution Flow Alteration

  • Instead of executing the original set of instructions, the processor executes the ISR in response to the interrupt.
  • This ensures that the processor can appropriately address the interrupt request.

Stack Management

  • During an interrupt, the values stored in registers are pushed onto the stack for safekeeping.
  • These values are organized within a stack frame, allowing for easy retrieval once the interrupt handling is complete.

Interrupt Nesting and Handling

  • In some cases, an interrupt might occur while another interrupt is being processed, leading to interrupt nesting.
  • To manage this scenario, the current interrupt is stacked below the existing one to ensure proper order and completion.

Question for Interrupts
Try yourself:
What is the purpose of an interrupt in a computer system?
View Solution

Common Interrupt Priorities

There are typical interrupt priorities for different categories, which include:

Hardware

  • Power supply failure
  • Power button press

User

  • Moving the mouse
  • Clicking an icon to open a new program
  • Keyboard presses like Ctrl, Alt, Delete

Software

  • Software
  • Illegal instruction encountered
  • Overflow
  • Login request
  • Crashing

Timer

  • Data logging programs which read sensors continuously
  • Screen recording applications

Input/output devices

  • Signaling of data transfer been completed
  • Printer ink supply notifications
  • Input devices not responding
The document Interrupts | Computer for GCSE/IGCSE - Year 11 is a part of the Year 11 Course Computer for GCSE/IGCSE.
All you need of Year 11 at this link: Year 11
92 docs|30 tests

Top Courses for Year 11

FAQs on Interrupts - Computer for GCSE/IGCSE - Year 11

1. What is the purpose of interrupts in computer systems?
Ans. Interrupts are used in computer systems to temporarily halt the current program being executed in order to handle a specific event or request that requires immediate attention.
2. How are interrupts prioritized in a computer system?
Ans. Interrupts are typically prioritized based on their urgency and importance, with higher priority interrupts being processed before lower priority interrupts.
3. What are common examples of hardware interrupts in computer systems?
Ans. Common examples of hardware interrupts include timer interrupts, keyboard interrupts, mouse interrupts, and disk interrupts.
4. How are interrupts handled by the CPU in a computer system?
Ans. When an interrupt occurs, the CPU saves the current state of the program being executed, processes the interrupt request, and then resumes the interrupted program.
5. What is the role of interrupt service routines (ISRs) in handling interrupts?
Ans. Interrupt service routines (ISRs) are special functions that are executed when an interrupt occurs, allowing the computer system to respond to the interrupt and perform the necessary actions.
92 docs|30 tests
Download as PDF
Explore Courses for Year 11 exam

Top Courses for Year 11

Signup for Free!
Signup to see your scores go up within 7 days! Learn & Practice with 1000+ FREE Notes, Videos & Tests.
10M+ students study on EduRev
Related Searches

Semester Notes

,

Interrupts | Computer for GCSE/IGCSE - Year 11

,

Summary

,

Exam

,

ppt

,

Interrupts | Computer for GCSE/IGCSE - Year 11

,

Viva Questions

,

practice quizzes

,

mock tests for examination

,

Objective type Questions

,

MCQs

,

Sample Paper

,

shortcuts and tricks

,

study material

,

video lectures

,

Extra Questions

,

Important questions

,

pdf

,

Previous Year Questions with Solutions

,

Interrupts | Computer for GCSE/IGCSE - Year 11

,

Free

,

past year papers

;