Interrupts (Cambridge (CIE) IGCSE Computer Science)

Revision Note

Robert Hampton

Written by: Robert Hampton

Reviewed by: James Woodhouse

Interrupts

What is an interrupt?

  • An interrupt is a signal for the CPU to stop what it is currently doing and do something else as a higher priority

  • The CPU is in a continuous loop of carrying out the fetch-decode-execute cycle, however there are occasions when this needs to be interrupted

How is an interrupt generated?

  • An interrupt can be generated by hardware and software:

    • Hardware - this is caused by a hardware device such as a hardware failure

    • Software - this occurs when an application stops or requests services from the OS

  • Interrupts are added to an area called the interrupt service routine

  • The interrupt service routine holds instructions that will need to be fetched, decoded and executed to complete the commands of the interrupt

  • The contents of the registers within the CPU cannot be lost by an interrupt, so contents are copied to a reserved area in RAM called a stack

  • Contents are added to the top of the stack, which will save them for later retrieval when the interrupt is complete

  • The interrupt will be executed instead of the original instructions

What are examples of hardware interrupts?

  • Hardware

    • power button may have been pressed

    • moving the mouse

    • clicking an icon to open a new program

    • keyboard presses e.g. ctrl, alt, delete

What are examples of software interrupts?

  • Software

    • a program is not responding

    • division by zero

    • two processes trying to access the same memory location

Examiner Tips and Tricks

The main focus of interrupts is the importance of the interrupt service routine and the role it plays in moving current instructions to the stack so that they can be interrupted BUT continue again afterwards

Worked Example

Describe the purpose of an interrupt in a computer system

[4]

Answer

Four from:

  • Used to attend to certain tasks/issues

  • Used to make sure that vital tasks are dealt with immediately

  • The interrupt/signal tells the CPU/processor (that its attention is required)

  • A signal that can be sent from a device (attached to the computer)

  • A signal that can be sent from software (installed on the computer)

  • The interrupt will cause the OS/current process to pause

  • The OS/CPU/ISR will service/handle the interrupt

  • They have different levels of priority

  • After the interrupt is serviced, the (previous) process is continued

  • It enables multi-tasking to be carried out on a computer

  • A valid example of an interrupt e.g. ‘out of paper’ message for a printer

Last updated:

You've read 0 of your 5 free revision notes this week

Sign up now. It’s free!

Join the 100,000+ Students that ❤️ Save My Exams

the (exam) results speak for themselves:

Did this page help you?

Robert Hampton

Author: Robert Hampton

Expertise: Computer Science Content Creator

Rob has over 16 years' experience teaching Computer Science and ICT at KS3 & GCSE levels. Rob has demonstrated strong leadership as Head of Department since 2012 and previously supported teacher development as a Specialist Leader of Education, empowering departments to excel in Computer Science. Beyond his tech expertise, Robert embraces the virtual world as an avid gamer, conquering digital battlefields when he's not coding.

James Woodhouse

Author: James Woodhouse

Expertise: Computer Science

James graduated from the University of Sunderland with a degree in ICT and Computing education. He has over 14 years of experience both teaching and leading in Computer Science, specialising in teaching GCSE and A-level. James has held various leadership roles, including Head of Computer Science and coordinator positions for Key Stage 3 and Key Stage 4. James has a keen interest in networking security and technologies aimed at preventing security breaches.