Syllabus coverage
- Describe the difference between system software and application software, and provide examples of each
- Describe the role and basic functions of an operating system, including managing files, handling interrupts, providing an interface, managing peripherals and drivers, managing memory, managing multitasking, providing a platform for running applications, providing system security and managing user accounts
- Understand how hardware, firmware and an operating system are required in order to run applications software
- Describe the role and operation of interrupts, including how an interrupt is generated, how it is handled using an interrupt service routine, and what happens as a result
- Understand that hardware interrupts include pressing a key on the keyboard and moving the mouse, and that software interrupts include division by zero and two processes trying to access the same memory location
Part of the O Level Computer Science syllabus 2210.
System software and application software
Software is everything the computer runs, as opposed to everything it is made of, and the syllabus divides it by asking who the software is for. System software provides the services that the computer requires: it manages the hardware and keeps the machine working. Application software provides the services that the user requires: it does the job the person at the keyboard actually wants done.
The group that is easy to forget is utility software. A utility is a small program that carries out one housekeeping job, such as backing up files, compressing files, checking a disk for faults, or scanning for malware. Utilities are system software, not application software, because they keep the computer healthy rather than doing a task the user wants done for its own sake.
The two kinds of software run at the same time. When you type into a word processor, the word processor is application software and the operating system underneath it is system software, deciding how much processor time and memory the word processor is allowed. Application software cannot run on its own: without system software nothing would load it, there would be no memory to load it into, and there would be no way to save the file it produces.
| Type of software | What it is for | Examples |
|---|---|---|
| System software: operating system | Provides the services the computer requires, managing hardware, memory, files, peripherals and users | Windows, macOS, Linux, Android, iOS |
| System software: utility software | Small maintenance programs that keep the computer working, secure and tidy | Backup software, file compression, disk checking, anti-malware |
| Application software | Provides the services the user requires, doing the task the user wants done | Word processor, spreadsheet, web browser, photo editor, video game |
The role of the operating system
The operating system (OS) is the system software that sits between the user, the application software and the hardware. Its role is to manage the resources of the computer and to provide the services that everything else needs. It is the first major piece of software to load when the machine is switched on, and it stays in charge until the machine is switched off.
Everything the operating system does follows from that role. The processor, memory, storage, screen and attached devices are limited resources, and several programs want them at the same time. The operating system decides who gets what, for how long, and in what order, so that no single program can take the machine over and so that programs do not collide with each other.
The syllabus names nine basic functions. They are usually taught as a list, but each one needs a sentence: a question that asks you to describe functions will not accept the names alone.
| Function | What it means in practice |
|---|---|
| Managing memory | Keeps track of which parts of RAM are free, allocates memory to a program when it starts and frees it when the program closes |
| Managing multitasking | Shares processor time between several programs so that they appear to run at the same time |
| Providing an interface | Gives the user a way to control the computer, either a graphical user interface or a command-line interface |
| Managing files | Organises files into folders and handles creating, naming, saving, copying, moving and deleting them |
| Managing peripherals and drivers | Controls the attached devices and uses the correct driver to translate instructions into signals each device understands |
| Providing a platform for running applications | Gives application software the services it needs, such as memory and file access, so it does not need to know the details of the hardware |
| Providing system security | Uses passwords and permissions to control what programs and users are allowed to do |
| Managing user accounts | Keeps a separate account with its own settings and access rights for each user, and handles logging in and out |
| Handling interrupts | Responds immediately when a device or a program signals that it needs attention |
Memory, multitasking and drivers in more detail
Managing memory means the operating system keeps a record of which areas of RAM are in use and which are free. When a program starts it is given the memory it asks for; while it runs it must stay inside that allocation; when it closes the memory is released so that another program can use it. If a program tries to write outside its own area, the operating system stops it, which is what makes one crashing program survivable for the rest of the machine.
Managing multitasking means the operating system gives each running program a share of processor time and switches between them so quickly that each one appears to run continuously. The same function explains why a computer with one processor can play music while a document is being typed.
Managing peripherals and drivers means controlling the devices attached to the machine. Each device needs a driver, the small piece of software that translates a general instruction such as 'print this page' into the signals that particular printer understands. The operating system chooses the right driver, sends the data to it, and handles the device's signals back.
Providing an interface means giving the user a way to work with the machine: a graphical user interface with windows, icons and menus, or a command-line interface where commands are typed. Providing system security means controlling what programs and users may do, using passwords, permissions and access rights. Managing user accounts means keeping a separate account for each user with its own settings and files, and handling logging in and out.
- Memory: track what is free, allocate it on start, free it on exit, stop a program writing outside its own area.
- Multitasking: share processor time so several programs appear to run at once.
- Drivers: translate general instructions into the signals a particular device understands.
- Platform: supply memory, file access and device access so applications do not deal with the hardware directly.
Hardware, firmware and the operating system
A computer runs in layers, and you need to know what sits on what. Hardware is the physical equipment: the processor, memory, storage and devices. Firmware is software stored permanently in the hardware itself, usually in ROM, so that it is available the instant the machine is switched on and is not lost when the power goes off. Application software is the program the user is trying to run.
The layers build upwards. The bootloader is firmware: it runs on the hardware, and its job is to find and start the operating system. The operating system then runs on the firmware, using the basic instructions the firmware provides to communicate with the hardware. Application software runs on the operating system, using the services the operating system provides.
The chain is hardware, then firmware, then operating system, then application software, and each layer depends on the one below it. This is why a program cannot run by itself. Application software needs an operating system to load it, give it memory and give it access to files and devices; the operating system needs firmware to start it and to handle the lowest-level details of the hardware; and the firmware needs the hardware to exist at all. Break any layer and everything above it stops working.
- The bootloader is firmware, and firmware runs on the hardware.
- The operating system runs on the firmware.
- Application software runs on the operating system.
- Each layer depends on the layer below it, so a broken layer stops everything above it.
Why applications need all three layers
A word processor does not contain instructions for reading a disk sector or lighting a pixel. It asks the operating system to open a file or draw a window, and the operating system does the rest. That is what 'providing a platform' means: the application is written against the operating system's services, not against the hardware.
The operating system in turn does not contain instructions for the particular disk controller or memory chips in the machine. Those details are handled by firmware, which knows the hardware it was written for and provides a standard way for the operating system to use it. Firmware is stored in ROM so that it is present immediately at switch-on, before anything has been read from disk.
So an application needs all three: the hardware to run on, the firmware to start and control that hardware, and the operating system to load the application and give it memory, files and devices. Remove any one and the application has nothing to stand on.
What an interrupt is and why it is needed
An interrupt is a signal sent to the processor telling it to stop what it is doing and deal with something else straight away. Interrupts exist because the processor cannot know in advance when a key will be pressed or when a printer will run out of paper, and it cannot sit waiting for these events either, because that would waste almost all of its time. Instead the processor gets on with its work, and the outside world interrupts it when there is something to say.
The alternative would be polling: checking every device over and over to see whether it needs attention. Polling wastes processor time on devices that have nothing to report, and it still reacts more slowly than an interrupt, because the device has to wait until its turn to be checked. An interrupt lets the device announce itself the moment it needs something.
How an interrupt is generated and handled
An interrupt is generated by a device or by a program. The device or program sends a signal to the processor, and the processor checks for such signals at the end of each instruction, so it notices almost immediately.
When an interrupt arrives, the processor finishes the instruction it is currently executing, then saves the contents of its registers and the address of the next instruction, so that it can come back later. It looks up the address of the interrupt service routine (ISR) for that interrupt and jumps to it. The ISR is a short program written to deal with that particular interrupt: it reads the key that was pressed, handles the division by zero, or services the printer.
When the ISR has finished, the processor restores the saved registers and the address of the next instruction, and carries on from exactly where it left off, as though nothing had happened. That return is the part students leave out, and it is usually the last mark in the question.
Interrupts also have priorities, because two can arrive at once. A high-priority interrupt, such as a hardware failure warning, is dealt with before a low-priority one such as a key press. If a higher-priority interrupt arrives while a lower-priority ISR is running, the processor can interrupt the ISR, deal with the more urgent signal, and then return to finish the ISR. Interrupts waiting to be handled are held in a queue.
- An interrupt is generated by a hardware device or by a running program.
- The processor finishes the current instruction and saves its registers and the address of the next instruction.
- It jumps to the interrupt service routine for that interrupt and runs it.
- It restores the saved values and returns to the instruction it was about to execute.
- Interrupts have priorities, and waiting interrupts are held in a queue.
Hardware and software interrupts
A hardware interrupt comes from a device. Pressing a key on the keyboard, moving the mouse, a printer signalling that it has finished a job, or a disk drive signalling that a read is complete are all hardware interrupts. The signal comes from outside the program that is running.
A software interrupt comes from a program while it is running. Division by zero is the standard example: the processor cannot produce a result, so an interrupt is raised and the operating system deals with it, usually by stopping the program and reporting the error. Two processes trying to access the same memory location is the other example; the operating system has to step in before one program corrupts another's data.
As a result of an interrupt something happens that would not have happened otherwise: a character appears on the screen, an error is reported to the user instead of the program failing silently, the next item of data is read from disk, or the processor starts another task. The point of interrupts is that the processor can respond immediately to an event without continuously checking every device to see whether it needs attention.
| Hardware interrupt | Software interrupt | |
|---|---|---|
| Source | A device outside the processor | A program that is running |
| Examples | Pressing a key, moving the mouse, a printer finishing a job, a disk read completing | Division by zero, two processes trying to access the same memory location |
| Why it is raised | The device needs the processor's attention | The program has done something the processor cannot continue with |
| Typical result | The device is serviced and the program carries on | The program is stopped and an error is reported to the user |
Key terms you must be able to define
- System software
- Software that provides the services the computer requires, including the operating system and utility software.
- Application software
- Software that provides the services the user requires, such as a word processor, a spreadsheet or a web browser.
- Utility software
- Small system programs that maintain, protect or configure the computer, for example backup, file compression, disk checking and anti-malware software.
- Operating system
- The system software that manages the resources of the computer and provides the services that application software needs, including memory, files, peripherals, multitasking, security, user accounts, the interface and interrupts.
- Firmware
- Software stored permanently in the hardware, usually in ROM, so that it is available as soon as the computer is switched on.
- Bootloader
- The firmware that runs on the hardware when the computer is switched on and finds and starts the operating system.
- Driver
- The small piece of software that translates general instructions from the operating system into the signals a particular peripheral device understands.
- Interrupt
- A signal sent to the processor telling it to stop what it is doing and deal with something else immediately.
- Interrupt service routine (ISR)
- The short program run when a particular interrupt occurs, written to deal with that interrupt; the processor returns to the interrupted instruction once it has finished.
- Hardware interrupt
- An interrupt generated by a device, for example pressing a key on the keyboard or moving the mouse.
- Software interrupt
- An interrupt generated by a program while it is running, for example division by zero or two processes trying to access the same memory location.
- Polling
- Checking each device repeatedly to see whether it needs attention, instead of letting the device raise an interrupt.
In context
2210 sets its questions inside systems a student already uses - a school network, a phone, a supermarket till, a vending machine, a website. These show how the theory is applied to a context you have not seen before, then you answer for the system you are given.
The operating system is system software and the web browser the student opens is application software, but both are needed at once: the browser cannot request a page without the operating system giving it memory and access to the network. The utility software on the laptop matters just as much, because it is what backs up the coursework folder and checks the disk for faults.
Every key you press generates a hardware interrupt. The processor finishes the instruction it is on, saves its registers and the address of the next instruction, jumps to the interrupt service routine for the keyboard, puts the character into the program's input, and then returns to exactly where it was. Without interrupts the processor would have to check the keyboard thousands of times a second and would have almost no time left for the word processor.
A student's program asks the user for a number and divides by it, and the user enters zero. The processor cannot carry out the division, so a software interrupt is raised. The operating system's routine for that interrupt stops the program and displays an error message rather than letting the machine carry on with a meaningless result.
The moment the power comes on, the processor runs the bootloader from firmware in ROM, because nothing has been read from storage yet. The bootloader checks the hardware and loads the operating system. Only when the operating system is running can the student double-click an application, because the application needs the operating system to load it and to give it memory.
The office runs an operating system with a separate user account for each member of staff, so that the accounts files can be opened only by the people allowed to see them. Files are organised into folders by year, utilities back up the accounts every evening, and the printer works because the correct driver is installed for it.
The printer is slow, but the word processor does not wait for it. The operating system sends the pages to the printer and returns the processor to the user. When the printer needs the next page it raises a hardware interrupt, the ISR sends more data, and the user carries on typing in between.
Flashcards
Click a card to flip it. Mark honestly — the tracker uses this.
Exam-style questions
6 questions, 21 marks. Write your answer and press Mark my answer — it is marked against the scheme and tells you which points you made and what would gain the next mark. You can still reveal the scheme and mark it yourself instead.
Mark scheme — tick each point you actually made
Mark scheme — tick each point you actually made
Mark scheme — tick each point you actually made
Mark scheme — tick each point you actually made
Mark scheme — tick each point you actually made
Mark scheme — tick each point you actually made
Exam technique for this topic
- Learn the nine operating system functions as a list, and be ready to say what each one does. The question almost always asks you to describe functions rather than just name them, and a list of names alone earns nothing.
- For an interrupt question, write the sequence in order: the interrupt is generated, the processor finishes the current instruction, the registers and the address of the next instruction are saved, the interrupt service routine is run, and the processor returns to where it left off. Missing the return costs the last mark.
- Give one hardware example and one software example when asked for types of interrupt, and label which is which. A key press and division by zero are the two the examiner expects, but any valid pair will do as long as the labels are right.
- When a question asks for examples of software, say which type each example is. 'A word processor is application software' scores; 'a word processor' on its own does not answer the question that was asked.
- Keep the levels of the machine apart in your answers: applications run on the operating system, the operating system runs on the firmware, and the firmware, including the bootloader, runs on the hardware.
Why students lose marks here
Where this fits in O Level Computer Science 2210
This page is one topic of Cambridge O Level Computer Science 2210. O Level Computer Science 2210 is the course home: every area and every topic in Cambridge's own order, the papers you sit and what each one tests, and the exam-practice tools. The full topic list, with each topic linked to its revision page, is on the O Level Computer Science 2210 syllabus page.