Computer ScienceFoundation18 min read

Software System

The layers between a program and the hardware it runs on

This topic appears in:

01

Two kinds of software, and why the distinction matters

System software runs the computer. Application software runs for the user. That is the whole distinction, and every classification question comes back to it: ask who the software is serving.

A word processor exists because someone wants to write a letter — application. An operating system exists because a word processor cannot talk to a disk drive on its own — system. A disk defragmenter serves the machine rather than the user, so it is utility software, a sub-category of system software.

TypePurposeExamples
Operating systemmanages hardware and runs everything elseWindows, Linux, Android, iOS
Utility softwaremaintains and protects the systemantivirus, backup, disk cleanup, compression
Device driverstranslate OS requests for one deviceprinter driver, graphics driver
Translatorsturn source code into machine codecompiler, interpreter, assembler
Application softwaredoes the user's actual workbrowser, spreadsheet, game, media player

Select Application and then Hardware. An application never reaches the hardware directly — every file it opens and every pixel it draws is a request passed down through the operating system.

02

What an operating system actually does

The operating system is the layer everything else sits on, and the syllabus names five jobs it performs. Each one exists because programs would otherwise have to solve the same problem separately and would interfere with each other while doing so.

  • Process management — deciding which program gets the CPU and for how long, so several appear to run at once on one core.
  • Memory management — allocating RAM to each program and keeping them out of each other's space, so a crash in one does not corrupt another.
  • File management — organising data into files and folders and controlling who may read or write them.
  • Device management — talking to printers, disks and network cards through drivers, so applications do not need to know one printer model from another.
  • User interface — providing a way in, whether a graphical desktop (GUI) or a command line (CLI).

GUI or command line?

A GUI is easier for a beginner, needs no memorised commands, and is what most users want. A CLI uses far fewer system resources, can be scripted so that a hundred files are processed with one line, and works over a slow remote connection where a desktop would not. Servers are usually run from a command line for exactly those reasons — the question is which suits the task, not which is more modern.

03

Translators: compiler, interpreter, assembler

A CPU understands only machine code — binary instructions. Anything written in a language a human can read must be translated, and there are three kinds of translator.

An assembler converts assembly language, which is a one-to-one symbolic version of machine code. A compiler translates the whole high-level program in one go, producing an executable file that can then be run repeatedly without the source. An interpreter translates and executes one line at a time, every time the program runs.

CompilerInterpreter
Translatesthe whole program at onceone statement at a time
Producesan executable filenothing saved — it runs directly
Speed of runningfast, already translatedslower, translated on every run
Error reportinga list at the end of compilationstops at the first error found
Source needed to run?noyes, every time
Better forfinished software being distributedlearning, testing and quick changes

The error-reporting difference is the examinable one

A compiler reports every syntax error it can find before producing anything, so you fix them in batches. An interpreter runs happily until it reaches a bad line and only then stops — so a program can appear to work for a while and then fail. That is why interpreted languages are pleasant to learn in and why compiled ones are shipped to customers.

04

Open source and proprietary

Software also differs in how it is licensed, and the paper asks for advantages of each rather than a verdict.

Proprietary software is sold under a licence that keeps the source code secret. You get professional support, tested releases and someone to blame, but you cannot change it and you must pay. Open source software publishes its source code, so it is free to use, can be modified for a specific need, and is examined by many people. But support may be limited to community forums, and there is no guarantee anyone will fix a problem you report.

Before you leave this chapter

  1. System software serves the machine; application software serves the user. Utilities are system software.
  2. The OS manages processes, memory, files, devices and the user interface.
  3. A GUI is easier; a CLI is lighter, scriptable and works over slow links.
  4. Compiler = whole program at once, produces an executable, reports all errors together.
  5. Interpreter = line by line, needs the source every run, stops at the first error.
05

How the operating system shares one CPU

A single-core processor can execute only one instruction at a time, yet a dozen programs appear to run at once. The operating system achieves this by switching between them extremely quickly — giving each a few milliseconds of CPU time in turn, so that all of them appear to progress smoothly. That is multitasking, and the switch itself is called a context switch.

The same trick applies to memory. Each program is given the illusion of a large private address space, while the OS maps those addresses onto whatever physical RAM is actually free. When RAM runs out, less-used pages are written to disk in a process called paging — which is why a machine short of memory suddenly becomes very slow.

TermMeaning
Processa program that is currently running, with its own memory
Schedulingdeciding which process gets the CPU next, and for how long
Context switchsaving one process's state and loading another's
Pagingmoving memory pages between RAM and disk when RAM is full
Deadlocktwo processes each waiting for something the other holds

Multitasking is not the same as multiple cores

A single core running twenty programs is time-slicing — only one instruction is ever executing. A four-core processor genuinely runs four at once. Both look identical to the user, and questions asking "how can several programs run at the same time on one processor" want the time-slicing answer, not the cores one.

06

Integrated development environments

A translator turns source code into something the machine can run, but a programmer needs more than that. An integrated development environment gathers the tools into one application, and the syllabus expects its features by name.

The editor is where code is written, with syntax highlighting colouring keywords and strings so mistakes stand out, and auto-completion suggesting names as you type. Line numbering matters because every error message refers to one. A debugger lets execution be paused at a breakpoint so the variables can be inspected, or stepped one line at a time. And a built-in translator compiles or interprets the code without leaving the application.

IDE featureWhat it is for
Syntax highlightingcolouring keywords and strings so errors are visible
Auto-completionsuggesting names, reducing typing mistakes
Line numberinglocating the line an error message refers to
Breakpointspausing execution to inspect variables
Single steppingrunning one line at a time to follow the logic
Variable watchdisplaying values as they change
Built-in translatorcompiling or running without leaving the IDE
Auto-indentationlaying out blocks consistently
Error diagnosticsreporting the fault and the line it is on

A debugger finds logical errors, not syntax ones

Syntax errors are reported by the translator before anything runs, and the message names the line. A logical error produces a program that compiles and runs and is wrong, so nothing reports it. Stepping through with a debugger and watching the variables is how you find where the values first diverge from what you expected — which is the only reliable way to locate a fault the machine cannot detect.

Practice questions

6 questions · 20 marks · full working on every one

Try each one on paper first, then open the working. The marks are shown where they are actually awarded, because that is where they are actually lost.

Short questions

3 · 6 marks

Two marks each, in the style of the short-question section of the paper. Answer in two or three lines.

SQ1[2 marks]
Differentiate between system software and application software, giving one example of each.
Model answer

System software manages and maintains the computer itself — for example Windows, an operating system. Application software performs tasks for the user — for example a word processor. The test is who the software serves: the machine, or the person using it.

Examiner tip. The examples are worth credit. Naming a specific product rather than a category makes the answer unambiguous.

SQ2[2 marks]
State two functions of an operating system.
Model answer

Any two of: process management (scheduling which program uses the CPU), memory management (allocating RAM and keeping programs separate), file management, device management through drivers, and providing a user interface.

Examiner tip. Name the function and say briefly what it does. A bare list of five words often scores one of the two marks.

SQ3[2 marks]
What is utility software? Give one example.
Model answer

Utility software is system software that maintains, analyses or protects the computer rather than doing the user's own work. Examples: antivirus, backup software, disk defragmenter, file compression.

Examiner tip. A utility serves the machine, which is why it counts as system software rather than an application.

Solved numericals

2 · 8 marks

Full working, one step per line, with the marks shown where they are awarded.

N1[4 marks]
Compare a compiler and an interpreter, giving two differences and one situation where each is preferable.
Full working
  1. A compiler translates the entire program at once, producing an executable file; an interpreter translates and runs one line at a time[1]
  2. A compiler reports all errors together at the end of compilation; an interpreter halts at the first error it reaches[1]
  3. A compiler is preferable for finished software being distributed, since it runs faster and the source code need not be shipped[1]
  4. An interpreter is preferable while learning or testing, because a change can be run immediately with no compilation step[1]

Whole program vs line by line; all errors vs first error; compiled for distribution, interpreted for development.

Examiner tip. Comparison questions want the two sides addressed in each point. "A compiler is fast" is only half a comparison.

N2[4 marks]
A school is choosing between a proprietary office suite and an open-source one. Give two advantages of each.
Full working
  1. Proprietary: professional technical support is guaranteed, with someone responsible for fixing faults[1]
  2. Proprietary: releases are formally tested, and compatibility with other schools and offices is more predictable[1]
  3. Open source: no licence cost, which for a school with many machines is a substantial saving[1]
  4. Open source: the source code can be inspected and modified, and the school is not locked into one supplier[1]

Proprietary: support and tested compatibility. Open source: no cost and freedom to modify.

Examiner tip. Two of each means four separate points. Repeating "it is free" in different words counts once.

Long questions

1 · 6 marks

Theory and numerical together, as they appear in the long-question section.

LQ1[6 marks]
A computer is being set up for a school computer laboratory.
  1. Explain why an operating system must be installed before any application software.
  2. Explain the role of a device driver, using a printer as an example.
  3. The laboratory manager wants to use a command-line interface on the server. Give two reasons this may be sensible.
Mark scheme
  1. Applications cannot access hardware directly — they make requests to the operating system, which carries them out[1]
  2. Without an OS there is nothing to load the application into memory, allocate it CPU time, or give it access to files[1]
  3. A device driver is software that translates general operating system requests into the specific commands one particular device understands[1]
  4. So the OS can say "print this page" without knowing anything about that printer model; installing a new printer means installing its driver[1]
  5. A CLI uses far fewer system resources than a graphical desktop, leaving more memory and CPU for the server's actual work[1]
  6. Commands can be written into scripts and repeated automatically, and a CLI works well over a slow remote connectioneither reason accepted[1]

(a) applications reach hardware only through the OS (b) a driver translates OS requests for one specific device (c) lighter on resources and scriptable

Examiner tip. The driver question is really asking why you must install software when you buy a new printer. Answering it in those terms shows the examiner you understand the layer rather than reciting a definition.