Home / GCSE · Edexcel / Computer Science / Computers

CPX10Operating Systems, Utility Software and Robust Software

Edexcel 1CP2 · 3.2.1

What an operating system does

The purpose of an operating system (OS) is to control the computer’s hardware and software. Windows, macOS, Linux, Android and iOS are operating systems.

  • Every application runs on top of the OS. When an app saves a file or prints, it asks the OS to do it.
  • Pearson’s spec names four functions: file management, process management, peripheral management and user management. Memory management (and virtual memory) is part of process management.
  • The OS also provides a user interface, so people can give the computer instructions.
  • Command-line interface (CLI): the user types text commands. Powerful and quick for experts, uses few resources, and commands can be saved and repeated. But commands must be learned exactly.
  • Graphical user interface (GUI): windows, icons, menus and a pointer. Easy for beginners to learn, but it needs more memory and processing power.
  • Natural language interface: the user speaks or types ordinary sentences, like asking a voice assistant a question. Hands-free and needs no training, but it can misunderstand accents, background noise or unclear requests.
InterfaceHow the user gives instructionsGood forDrawback
CLITyping commandsTechnicians; repeating tasks; computers with few resourcesCommands must be remembered and typed exactly
GUIClicking icons and menus with a pointer or touchMost users, especially beginnersUses more memory and processing power
Natural languageSpeaking or typing everyday sentencesHands-free use; users who can’t use a keyboard easilyCan misunderstand what was said

The operating system sits between the user and applications above and the hardware below.

Exam tipIf a question names one OS function, such as file management, don’t give it back as your answer. Pick a different one of the four and say what it does.
Operating system (OS)
Software whose purpose is to control the computer’s hardware and software.
User interface
The part of the OS that lets a person give the computer instructions and see the results: CLI, GUI or natural language.
Edexcel 1CP2 · 3.2.1

File management

File management is the process of organising, storing and retrieving files.

  • Files are organised in a hierarchical (tree) structure of directories (folders) and sub-folders.
  • The tree starts at the root directory. Every folder and file sits somewhere below the root.
  • Each file has a unique path from the root, such as C:\Users\Sam\Documents\essay.docx. (Windows uses \ between names; macOS and Linux use /.)
  • Two files can have the same name if they are in different folders, because their paths are still different.
  • The OS provides common file-handling functions: save, open, rename, delete, plus copy and move.
  • The OS keeps track of where each file is physically stored on the drive, so the user only has to know its name and folder.

A folder tree. The path to a file lists every folder from the root down to it.

Exam tipExaminers want the structure, not just “files and folders”. Say it is a hierarchy (tree) starting from a root, and that each file has a unique path. Don’t confuse file management with defragmentation, which is a utility.
File management
The process of organising, storing and retrieving files.
Root directory
The top folder of the hierarchy; every other folder and file is below it.
Path
The route from the root through each folder to a file. It identifies the file uniquely.
Edexcel 1CP2 · 3.2.1

Process management and scheduling

When a program is loaded into memory so it can be executed, it becomes a process. Many processes are active at once. Process management shares the finite resources (the CPU and main memory) between them.

  • Only one process at a time has exclusive use of the CPU (on a single processor).
  • Processes wait their turn in a queue.
  • A scheduling algorithm decides the order, so processes can be prioritised: an urgent process may be moved ahead.
  • Each process gets the CPU for a short time slice. If it hasn’t finished when its time slice ends, it goes to the back of the queue.
  • Time slices are so short that all the programs seem to run at the same time.
  • You don’t need to know any particular scheduling algorithm by name.

Each process uses the CPU for one time slice. Unfinished processes rejoin the back of the queue.

Worked exampleProcesses K, L and M are queued in that order. K needs 2 time slices, L needs 1 and M needs 2. Which process has the CPU in each time slice?
  1. Slice 1: K (K still needs 1, so it goes to the back: queue L, M, K)The front of the queue gets the CPU.
  2. Slice 2: L (finished; queue M, K)L only needed one slice, so it leaves.
  3. Slice 3: M (still needs 1; queue K, M)Unfinished, back of the queue.
  4. Slice 4: K (finished) Slice 5: M (finished)Each process finishes on its last slice.
K, L, M, K, M
Exam tipWords such as “scheduling” or “priority” need linking to what happens: the process waits in a queue, gets a time slice of CPU time, and returns to the back of the queue if unfinished. Don’t drift into the fetch-decode-execute cycle or buses.
Process
A program that has been loaded into memory so it can be executed.
Scheduling algorithm
The method the OS uses to decide which process gets the CPU next, and to prioritise processes.
Time slice
The short, fixed amount of CPU time a process gets before the next process has its turn.
Edexcel 1CP2 · 3.2.1

Memory management and virtual memory

  • The OS shares main memory (RAM) between processes, giving each process its own section of RAM.
  • Keeping sections separate stops one process overwriting another’s instructions or data.
  • When RAM is short, the OS uses virtual memory: an area of secondary storage (hard drive or SSD) set aside to act as extra memory.
  • RAM is divided into pages. A paging algorithm moves pages of processes that aren’t being used right now out of RAM into virtual memory.
  • When one of those processes needs the CPU again, its pages are swapped back into RAM (and something else may be swapped out).
  • Secondary storage is much slower than RAM, so a computer that swaps a lot (because it has too little RAM for what is running) slows down.

Pages of inactive processes are swapped out to virtual memory on secondary storage, and swapped back when needed.

Exam tipVirtual memory is on the computer’s own secondary storage. It is not cloud storage. And “used when RAM runs out” isn’t enough: describe inactive processes being moved out of RAM to secondary storage and back in when they are needed.
Virtual memory
An area of secondary storage that the OS uses as extra main memory when RAM is full.
Paging
Dividing memory into pages and swapping pages of processes between RAM and virtual memory as they are needed.
Edexcel 1CP2 · 3.2.1

Peripheral management: drivers and interrupts

Peripheral management means controlling the devices connected to the computer, such as the keyboard, mouse, monitor, printer and scanner.

  • Every model of device works differently. The OS uses a device driver for each one: software that translates the OS’s general instructions into the commands that particular device understands (and the device’s signals back again).
  • Because of drivers, an application can just ask the OS to “print this”, without knowing which printer is attached.
  • Devices are much slower than the CPU. The CPU doesn’t wait for them: it carries on running other processes.
  • When a device needs attention (a key is pressed, the printer is ready for more data, the printer has run out of paper), it sends an interrupt: a signal to the OS that it needs immediate attention.
  • The OS then pauses the current process, deals with the device (using its driver), and goes back to what it was doing.
  • Data waiting to go to a slow device can be held in a queue in memory (for example, a queue of print jobs).

The OS talks to each device through its driver. The device sends an interrupt when it needs attention.

Exam tipName both parts when you describe peripheral management: the driver (how the OS communicates with the device) and the interrupt (how the device tells the OS it needs attention).
Peripheral
A device connected to the computer, such as a keyboard, monitor or printer.
Device driver
Software the OS uses to communicate with a particular peripheral.
Interrupt
A signal from a device to the OS that it needs immediate attention.
Edexcel 1CP2 · 3.2.1

User management

On a computer with several users, the OS controls who can use it and what each person can do.

  • Adding and deleting users: an administrator creates an account for each person and removes it when they leave.
  • Authenticating users: checking each user’s identity when they log in, for example with a username and password.
  • Granting access rights to applications, data and systems: each user (or group of users) is given access only to what they need.
  • Permissions control what users can do with a file or folder, such as read only, read and write (change), or no access.
  • An administrator account has extra privileges, such as installing software and managing other users’ accounts.
  • This protects data: users can’t open or change files that aren’t theirs, even by accident.
PermissionWhat the user can do
No accessCan’t open the file or see inside the folder
Read onlyCan open and view, but not change or delete
Read and writeCan open, change and save
Exam tip“The OS gives users permissions” is too vague. Say that the OS lets an administrator add or delete users or set permissions, and then say what that achieves (for example, staff can view the price list but can’t change it).
User management
Adding and deleting users, authenticating them, granting access rights and using permissions to control what they can do.
Access rights
What applications, data and systems a user is allowed to use.
Permissions
Settings that control what a user can do with a file or folder, e.g. read only or read and write.
Edexcel 1CP2 · 3.2.2

Utility software

Utility software is a collection of tools that help maintain the functionality of a computer. Pearson’s spec names five.

  • File repair: repairs or recovers data from damaged or corrupted files, for example a document that won’t open after a power cut or a disk fault.
  • Backup: automates making copies of files, so data can be recovered if something goes wrong (deleted by mistake, drive failure, ransomware). It can run on a schedule.
  • Data compression: reduces the size of files so they take up less storage space and take less time to transfer. (Lossy and lossless compression are in Storage units, file sizes and compression.)
  • Disk defragmentation: reorganises the data on a magnetic hard drive so that the parts of each file are stored contiguously (next to each other).
  • Anti-malware: detects, quarantines and removes malware. (How it detects malware is in Cybersecurity.)
  • You may be asked to choose the right utility for a task. Match the problem to the tool.
ProblemUtility
A spreadsheet is corrupted and won’t openFile repair
Work must be recoverable if the laptop is stolenBackup
A video is too large to emailData compression
Files on an old magnetic hard drive load slowlyDisk defragmentation
A downloaded file might contain a virusAnti-malware
Exam tip“File repair repairs files” scores nothing: it repeats the name. Say it recovers data from files that are damaged or corrupted. And don’t describe backup when asked about file repair: backup needs a copy made beforehand; file repair works on the damaged file itself.
Utility software
A collection of tools that help maintain the functionality of a computer.
File repair software
Repairs or recovers data from damaged or corrupted files.
Data compression software
Reduces file sizes so files use less storage space and take less time to transfer.
Anti-malware
Detects, quarantines and removes malware.
Edexcel 1CP2 · 3.2.2

Backups and defragmentation in detail

  • Full backup: copies every file each time. Simple to restore (one backup), but slow to make and needs lots of storage.
  • Incremental backup: after one full backup, each backup copies only the files that have changed since the last backup. Quick and small, but a restore needs the last full backup plus every incremental backup since, in order.
  • As a hard drive fills and files are deleted and saved, gaps appear. New files get split into pieces in different gaps: they are fragmented.
  • To read a fragmented file, the drive’s read/write head has to move to several places, which takes time.
  • Defragmentation moves the pieces so each file is in one continuous run, and gathers free space together. Files then open more quickly.
  • Solid state drives have no moving read/write head, so they don’t need defragmenting.

A week of backups. Restoring on Thursday needs Sunday’s full backup and every incremental after it.

Before and after defragmentation: each file’s blocks end up next to each other, with the free space together at the end.

Exam tipFor full v incremental, give both sides: “a full backup copies all the files every time, but an incremental backup copies only the files changed since the last backup”.
Full backup
A copy of every file, made each time the backup runs.
Incremental backup
A copy of only the files that have changed since the last backup.
Fragmentation
When the parts of a file are stored in separate places on a magnetic disk.
Defragmentation
Reorganising a magnetic hard drive so that the parts of each file are stored contiguously.
Edexcel 1CP2 · 3.2.3

Robust software and vulnerabilities

Robust software keeps working correctly when it meets unexpected input or conditions, and is free from vulnerabilities that criminals could exploit.

  • A vulnerability is a weakness that an attacker could use to get in, steal data or stop the software working.
  • Programming bugs: errors in the code, for example a crash when a field is left empty.
  • Poor or weak design: security wasn’t thought about at the start.
  • Insufficient testing: problems are only found after release.
  • Poor programming practice, such as using third-party code libraries without checking them.
  • Inadequate validation of input: lets in data the program can’t handle, or that tricks it.
  • Weak authentication: short or default passwords, no limit on login attempts.
  • Unencrypted sensitive data: if the data is stolen, it can be read straight away.
VulnerabilityHow a criminal could exploit it
Weak authenticationGuess or try thousands of passwords until one works
Unencrypted passwords stored in a fileSteal the file and read every password
Input not validatedType unexpected data that crashes the program or makes it reveal data
Unchecked third-party libraryUse a known flaw in that library to get into the software
Exam tipIf a question says “other than programming bugs”, syntax and logic errors don’t count: they are bugs. Give design, testing, validation, authentication or encryption weaknesses instead.
Robust software
Software that works correctly even with unexpected input or conditions and is free from vulnerabilities.
Vulnerability
A weakness in software that could be exploited by a criminal.
Edexcel 1CP2 · 3.2.3

Audit trails and code reviews

Two methods help developers find vulnerabilities and keep software robust.

  • An audit trail is a record of every change made to the code: who made it, when, and what was changed.
  • Audit trails give accountability: if a change introduces a vulnerability, the team can see who made it and when, and ask why.
  • Because each change is tracked, it is easier to go back to an earlier version that worked.
  • A code review is when code is checked for errors and vulnerabilities before it is released. It can be done by a programmer or by an automated tool.
  • Programmer review: an experienced person reads the code. They can understand what it is meant to do and spot design flaws. But it takes a long time, needs someone experienced, and people make mistakes or miss things.
  • Automated review: software scans the code. It is fast, can check every line of a large program consistently, and can run every time code changes. But it only finds the kinds of problem it has been programmed to look for.
Programmer code reviewAutomated code review
StrengthUnderstands the purpose; can spot poor designFast; checks all the code the same way every time
WeaknessSlow; needs an experienced reviewer; human errorOnly finds problems it is programmed to find
Exam tipAn audit trail is not just a “change log” or “version control”: name it as an audit trail and say it records who changed what and when. Don’t mix it up with a code review, which checks the code itself.
Exam tipIf the question rules out cost, don’t give cost. Read the stem for anything already given.
Audit trail
A record of changes made to the code: who made each change, when, and what changed.
Code review
Checking code for errors and vulnerabilities, by a programmer or an automated tool.