4.1 Types of software and interrupts

Test yourself on Types of software and interrupts 12 questions — drag-to-order, code completion, matching and multiple choice.
Start the quiz

The Operating System (OS)

Watch this lesson Video 4.1.1 · 7:29 · System, application and firmware — and the seven jobs the OS is actually doing

1. Introduction to Software

Software is the collection of instructions and data that tells the computer hardware what to do. Hardware is the body; software is the mind.

System Software

Whom it works for: The Hardware.

It manages the computer's resources and provides a platform for other software to run.

Categories: Operating Systems, Utility Programs, Library Programs, Language Translators (Compilers/Interpreters).

Application Software

Whom it works for: The User.

It allows users to perform specific tasks or solve real-world problems.

Categories: Word Processors, Spreadsheets, Database Management Systems, Web Browsers, Graphic Editors.

2. Firmware: The Link

Firmware is a specific type of software that is "hard-coded" into a hardware device.

Firmware provides the low-level control for a device's specific hardware. It acts as the permanent instructions that tell hardware how to communicate with the Operating System.
Example: The BIOS on a motherboard or the code inside a washing machine controller.

3. The Operating System (OS)

The Operating System is the most important piece of system software. It acts as an interface between the user and the hardware.

Examples: Windows, macOS, Linux, Android, iOS.

4. Core Functions of the OS

The OS manages the complexity of the computer through these 7 key functions:

1. Memory Management Allocates RAM to different programs and prevents them from interfering with each other's data.
2. Processor Management Decides which process gets the CPU's attention and for how long (Scheduling).
3. Peripheral Management Communicates with input and output devices (via drivers) like printers and monitors.
4. Storage Management Manages how data is saved, deleted, and organized on HDDs/SSDs (the File System).
5. Security Management Handles user logins, passwords, and access rights to keep data private.
6. User Interface (UI) Provides the way for humans to interact with the machine (GUI or CLI).
7. Interrupt Handling Responds to signals from hardware or software that need immediate CPU attention.
⚠️ Exam Tip: If an exam asks for the "primary purpose" of an OS, use the phrase: "To manage the computer's hardware and provide an interface for the user."

Interrupts and Buffers ⚡

Watch this lesson Video 4.1.2 · 8:05 · Why the CPU stops, how it resumes, and why a printer needs both mechanisms at once

Efficient computing relies on the Operating System's ability to multitask and manage the speed differences between the CPU and external devices.

Interrupts 🔔

An interrupt is a signal sent from a device or software to the CPU, requesting immediate attention.

Examples:

  • Keyboard key press ⌨️
  • Printer out of paper 🖨️
  • Software error (e.g., divide by zero) ❌
  • Timer interrupt ⏱️

Buffers 📦

A buffer is a temporary memory area used to hold data while it is being moved, compensating for speed differences between hardware.

Examples:

  • Streaming video (prevents stuttering) 🎥
  • Sending a document to a printer 📄
  • Hard drive data transfer 💾

5b. Where Interrupts Come From

The syllabus expects the sources of interrupts by category, not just examples. There are four:

  • Hardware interrupt — generated by a physical device. A key is pressed, a mouse is moved, a printer runs out of paper, a device is unplugged.
  • Software interrupt — generated by a running program when something goes wrong or a service is needed. Division by zero, an attempt to access memory the program does not own, or a request for an operating system service.
  • Timer (clock) interrupt — generated at fixed intervals by the system clock. This is what makes multitasking possible: it periodically takes the CPU away from the current process so the OS can give another one a turn.
  • Input/output interrupt — generated when a device has finished a transfer or needs more data. A disk has completed a read; a printer buffer has emptied.
The timer interrupt deserves attention. Every other interrupt is a response to something happening. The timer interrupt happens whether or not anything has occurred, and it is the mechanism behind processor management: without something to take the CPU back at regular intervals, a single program could keep it forever and nothing else would ever run.

5c. Interrupt Priority

Interrupts do not all matter equally, so each is given a priority. If an interrupt arrives while another is already being serviced, the CPU compares the two:

  • If the new interrupt is higher priority, the current service routine is itself suspended — its state is saved in the same way — and the more urgent one is handled first.
  • If it is lower or equal priority, it waits in a queue until the current routine has finished.

This is why a power-failure warning or a hardware fault is dealt with immediately while a printer asking for more data waits its turn. Without priorities, a trivial but frequent interrupt could delay a critical one indefinitely.

6. How the OS Handles Interrupts 🛠️

When an interrupt occurs, the OS must ensure the current task is not lost. It follows these steps:

1. Completion The CPU finishes its current Fetch-Decode-Execute cycle.
2. Status Check The CPU checks for any pending interrupts before starting the next cycle.
3. Preservation The current state (contents of registers and Program Counter) is saved to the stack.
4. ISR Execution The OS identifies the source and loads the appropriate Interrupt Service Routine (ISR).
5. Restoration Once handled, the saved state is loaded back from the stack, and the original process resumes.
💡 Exam Tip: Remember, the main purpose of a Buffer is to allow the CPU to continue with other tasks while the slower hardware processes the data, whereas an Interrupt is all about getting the CPU to drop everything to handle an urgent request.

7. Buffers and Interrupts Working Together

Exam questions rarely ask about a buffer or an interrupt on its own. They describe printing, and expect you to explain how the two operate as one mechanism. Here is that sequence:

  1. The user sends a document to print. The CPU transfers the data into the printer buffer — quickly, because that is a memory-to-memory transfer.
  2. The CPU is now free and returns to other tasks. It does not wait for the printer, which is thousands of times slower than it is.
  3. The printer works through the buffer at its own speed, printing as it goes.
  4. When the buffer is nearly empty, the printer sends an interrupt to the CPU requesting more data.
  5. The CPU saves what it was doing, refills the buffer, and resumes the interrupted task.
  6. Steps 3 to 5 repeat until the whole document has been printed.
Why both are needed. The buffer alone would not be enough — something has to tell the CPU when to refill it, and polling the printer constantly would waste exactly the time the buffer was meant to save. The interrupt alone would not be enough either — without somewhere to put the data, the CPU would have to feed the printer one character at a time and would spend its life waiting. The buffer handles the speed difference; the interrupt handles the timing.

Utility Software

Watch this lesson Video 4.1.3 · 7:40 · The programs that maintain the system rather than serve the user

Utility Software & Device Drivers

Syllabus Topic 4.1.2: Maintenance and Optimization

1. What is Utility Software?

Utility software is a type of System Software designed to help analyze, configure, optimize, or maintain a computer. Unlike applications, utilities focus on how the computer infrastructure operates.

File Repair

Attempts to fix corrupted files or restore data from damaged sectors on a disk.

Backup Software

Creates copies of data so it can be recovered in case of hardware failure or accidental deletion.

Data Compression

Reduces the size of files using Lossy or Lossless algorithms (e.g., creating a .zip file).

Disk Defragmentation

Reorganizes files on a magnetic HDD so that related data is stored together, speeding up read/write times.

Anti-Malware

Scans for, detects, and removes malicious software like viruses, worms, and spyware.

1b. Anti-virus and File Management

Two utilities the syllabus names explicitly and which are easy to overlook:

Anti-virus (anti-malware) software

Anti-virus software is a utility that protects a system from malicious software. It works by:

  • Scanning files, and incoming data, comparing them against a database of known virus signatures;
  • Checking files before they are opened or downloaded, and monitoring the system continuously in the background;
  • Quarantining anything suspicious — isolating it so it cannot run — and then deleting it or allowing the user to decide;
  • Updating its signature database regularly, because it can only recognise threats it knows about. An out-of-date anti-virus is close to useless against a new virus.

File management (file manager)

A file manager is the utility that lets a user organise stored data: creating, opening, renaming, moving, copying and deleting files and folders, and searching for them. It also shows file properties such as size and date modified. It is the utility you use most often without thinking of it as one.

2. Device Drivers

The Translator

A Device Driver is a specialized program that tells the Operating System how to communicate with a specific piece of hardware.

  • Every hardware device (Printer, GPU, Mouse) needs a driver.
  • It acts as a translator between the OS and the hardware's unique commands.
  • Without the correct driver, the OS "sees" the device but doesn't know how to use its features.

3. The Formatter Utility

Before a storage device (like a new HDD or USB drive) can be used, it must be formatted. This utility:

  • Sets up the File System (e.g., NTFS or FAT32).
  • Divides the disk into sectors and tracks.
  • Checks for "Bad Sectors" and marks them as unusable.
  • Warning: Formatting usually erases all existing data on the drive!

4. Summary of System Software Roles

Software Type Main Goal
Operating System Provide an interface and manage basic hardware resources.
Utility Software Perform maintenance, security, and optimization tasks.
Device Driver Allow the OS to talk to specific external hardware.
💡 Exam Context: When asked how to improve computer performance, you might suggest using a Disk Defragmenter (for HDDs) or Cleanup Utilities to remove temporary files.