System software and the operating system
IGCSE Computer Science · Software
Two categories of software
| system software | runs and manages the computer itself — the operating system, utility programs, device drivers, compilers |
| application software | lets the user do a task — word processor, spreadsheet, browser, photo editor, games |
The test: ask who the software serves. Serving the machine means system software; serving the user's task means application software.
Utility software is system software, not application software. This is the classification most often got wrong. A virus checker or a defragmenter does not help the user write a letter — it keeps the computer working properly.
What the operating system does
- memory management — deciding which program gets which part of memory, and stopping programs overwriting each other;
- file management — creating, naming, saving, deleting and organising files in folders;
- peripheral and device management — communicating with printers, keyboards and disks through device drivers;
- providing a user interface — so the user can operate the machine without knowing machine code;
- multitasking — sharing processor time between programs so several appear to run at once;
- security — user accounts, passwords, access rights;
- managing processes and handling interrupts.
Without an operating system, a user would have to control the hardware directly — which is why the OS is the piece of software everything else sits on.
Interrupts
An interrupt is a signal sent to the processor telling it that something needs attention now. The processor suspends what it is doing, saves its current state, runs a short routine to deal with the event, then restores its state and carries on.
Sources of interrupts: a key being pressed, a printer running out of paper, a timer reaching zero, a divide-by-zero error, or a disk finishing a transfer.
The point of interrupts: without them the processor would have to keep checking every device over and over to see if anything had happened — which wastes an enormous amount of time. Interrupts let devices announce themselves.
Utility software
- virus checker — scans files against a database of known virus signatures, quarantines or deletes infected files;
- defragmentation software — files get saved in scattered fragments as a disk fills up, so the read head must jump around. Defragmentation gathers the pieces of each file together, so access is faster;
- backup software — makes copies, often automatically on a schedule, so data survives hardware failure;
- compression software — reduces file size for storage or transmission.
Worked example: classifying software and explaining defragmentation
(a) Classify each of the following as system software or application software, with a reason: a virus scanner; a spreadsheet; a printer driver; a web browser. (b) Explain what defragmentation does and why it speeds up access.
Solution
(a) The test used for all four: ask who does this software serve? Serves the machine → system. Serves the user's work → application.
Virus scanner → system software. It is utility software: it does not help the user finish any task, but keeps the computer working correctly and safely.
This is the item most often classified wrongly, because the user sees it and clicks on it like an ordinary application.
Spreadsheet → application software. It exists for the user to do a specific task — calculating, building tables, drawing charts.
Printer driver → system software. It allows the operating system to communicate with the hardware, and the user almost never interacts with it directly.
Web browser → application software. It serves a user need: viewing web pages.
(b) What defragmentation does.
The problem. As a disk gradually fills up and files are deleted and new ones written, the remaining gaps are small and scattered. A large file no longer has any contiguous space big enough to hold it, so the operating system has to split it into many pieces and fit them into different gaps.
The consequence. When reading that file, the read head must jump from place to place on the disk surface to collect all the pieces. Each jump takes mechanical time, so opening the file becomes noticeably slower.
What defragmentation does. It rearranges the data on the disk so that the pieces of the same file sit next to each other, and also gathers the free gaps into one large block.
Why it is faster. The read head only needs to travel in one continuous sweep to read the whole file, without jumping. Seek time falls sharply.
What to state to avoid misunderstanding. Defragmentation does not delete any file and does not create extra free space — it only rearranges positions.
It is also almost useless for SSDs, because an SSD has no mechanical read head, so access is equally fast everywhere.
Worked example: interrupts and why they are needed
Describe what happens when the processor receives an interrupt, and explain why the interrupt mechanism is more efficient than the processor checking each device itself.
Solution
What happens when there is an interrupt.
Step 1. A device or program sends an interrupt signal to the processor, indicating that something needs handling immediately.
Step 2. The processor completes the instruction it is executing, then pauses its current work.
Step 3. It saves its current state — the contents of the registers and how far the program has run. This step is essential, because without saving it the processor would not know where to return to.
Step 4. It runs a short piece of code to handle that event — for example reading the key that has just been pressed, or telling the user the printer is out of paper.
Step 5. When done, it restores the saved state and carries on exactly where it left off.
Why interrupts are more efficient than checking itself.
Without interrupts, the processor would have to keep asking each device: “has any key been pressed on the keyboard?”, “is the printer finished?”, “has the disk finished transferring?” — and repeat that loop forever.
The problem: most of the time the answer to each question is “not yet”. A user types a few keys a second, while the processor runs billions of instructions a second — so almost all of the time spent asking is wasted.
With interrupts, the processor does not have to ask anything. It devotes all its time to real work, and devices speak up for themselves when needed.
A second benefit — faster response. With checking, an event may have to wait for the next turn to be asked. With an interrupt, it is handled almost instantly.
That is why every modern computer relies on interrupts, and why the keyboard responds as soon as we type even while the computer is running many other programs.