Types of software and interrupts

Computer Science · Software. The idea in plain words, the rules to remember, the mistake to avoid and a worked example, written and checked by Mega Lecture.

Test this topic freeAll Computer Science topics

The idea

System software runs and manages the computer itself, for example the operating system, utility programs and device drivers. Application software lets the user do a task, for example a word processor, a web browser or a game.

Software runs in layers. Applications run on the operating system. The operating system is loaded by the firmware (the bootloader). The firmware runs on the hardware.

An interrupt is a signal sent to the CPU by hardware or software to say that something needs attention. The CPU stops its current task for a moment, deals with the interrupt, then carries on from where it stopped.

In simpler words

System software runs the computer itself, like the operating system and device drivers. Application software helps you do a task, like writing or browsing. An interrupt is a signal to the CPU that something needs attention, such as a key being pressed. The CPU saves what it was doing, deals with the interrupt, then carries on where it stopped.

An everyday comparison

An interrupt is like a teacher marking homework when a student raises a hand. The teacher finishes the current sentence, puts a bookmark in place, helps the student, then picks up exactly where they left off. A more urgent problem gets dealt with first. The comparison stops working because the CPU saves exact register contents, which is much more precise than a bookmark.

Rules to remember

Common mistake

Students write that the CPU stops at once and the old task is lost. The current state is saved first, so the task continues afterwards.

In the exam

Give several operating system functions with a short explanation each, such as memory management. For interrupts, give an example of a hardware and a software interrupt. Then describe handling in order: the CPU finishes its current cycle, checks priority, saves register contents, runs the interrupt service routine, restores the state and continues. Never say the task is lost.

Worked example

A printer runs out of paper while the user is watching a video. Describe what the CPU does.

  1. The printer sends a hardware interrupt signal to the CPU.
  2. The CPU finishes its current cycle, checks the priority, and saves the contents of its registers for the video task.
  3. It runs the interrupt service routine for the printer, which shows an 'out of paper' message.
  4. The saved register contents are restored and the video carries on.

Answer: The interrupt is handled by its ISR, then the video task continues from where it stopped.

Ask about this

Type what you are stuck on. The helper finds the explanation, worked examples and the notes to read, free and instant.

Keep going

← Network hardwareTypes of programming language, translators and IDEs →Take a Computer Science test