✅ Free · Component 1 · 1.2 Software and Software Development
1.2.1a Operating System Functions
OCR H446 · A Level Computer Science · ~12 min read
Notes
Video
Slides
Worksheet
Quiz

What is an Operating System?

An operating system (OS) is system software that manages computer hardware and software resources and provides common services for application programs. Without an OS, users would need to write machine code to directly control hardware for every task. The OS acts as an intermediary layer between user applications and the hardware.

Examples: Windows 11, macOS, Linux (Ubuntu, Debian), Android, iOS.

1. Memory Management

The OS controls how main memory (RAM) is allocated to processes. Key responsibilities:

  • Allocation: deciding which processes receive which areas of memory, and how much.
  • De-allocation: freeing memory when a process terminates so it can be reused.
  • Protection: ensuring that one process cannot read or corrupt the memory space of another (memory isolation/protection).
  • Virtual memory: using secondary storage to extend the apparent size of RAM when RAM is full (covered in 1.2.1b).

2. Process Management and Scheduling

A process is a program in execution. The OS must manage multiple processes running concurrently (or apparently concurrently on a single CPU). A thread is the smallest unit of execution within a process.

  • Process states: a process can be in one of three states: Running (currently using the CPU), Ready (waiting for CPU time), or Waiting/Blocked (waiting for an I/O operation or event).
  • Scheduling: the OS scheduler decides which ready process gets CPU time next, using a scheduling algorithm (covered in 1.2.1c).
  • Context switching: when the CPU switches from one process to another, the OS saves the current process state (registers, program counter) to the PCB and loads the saved state of the next process.
  • Process Control Block (PCB): a data structure the OS maintains for each process, containing: process ID, process state, program counter, CPU registers, memory management info, I/O status.

3. Input/Output (I/O) Management

The OS manages all communication between the CPU and peripheral devices (keyboard, disk, network, display).

  • The OS provides a hardware abstraction layer: applications use standard I/O calls without needing to know the low-level details of each device.
  • Device drivers (covered in 1.2.1d) are the interface between the OS and specific hardware devices.
  • Spooling (Simultaneous Peripheral Operations On-Line): data is queued (e.g. a print queue) so the CPU is not tied up waiting for slow peripherals.
  • Buffering: temporary storage of I/O data to manage speed differences between the CPU and peripherals.

4. File Management

The OS provides a file system to organise, store, retrieve, and manage data on storage devices.

  • Directory/folder structure: the OS maintains a hierarchical structure of directories to organise files.
  • File access control: the OS enforces permissions (read/write/execute) for files and directories, determining which users or processes can access them.
  • File operations: creating, reading, writing, deleting, and renaming files.
  • File allocation: managing how files are stored physically on the storage medium (FAT32, NTFS, ext4).

5. Security Management

  • User authentication: verifying user identity (username/password, biometrics, 2FA) before granting access.
  • Access control: ensuring only authorised users or processes can access specific resources.
  • Encryption: the OS may manage encryption of the file system (e.g. BitLocker on Windows).
  • Firewall integration: the OS can include a built-in software firewall to control network access.

6. User Interface

The OS provides either a CLI (Command Line Interface) or a GUI (Graphical User Interface) for user interaction.

  • CLI: text-based commands typed by the user. Examples: Linux bash, Windows PowerShell/cmd. More efficient for experienced users, scriptable, lower overhead.
  • GUI: windows, icons, menus, pointers (WIMP). More intuitive for general users. Higher resource usage.

Types of Operating System

TypeDescriptionExamples
Multi-taskingMultiple processes share CPU time via scheduling; appears simultaneousWindows, macOS, Linux
Multi-userMultiple users concurrently access one system; OS manages resource isolationLinux server, UNIX mainframe
Real-time (RTOS)Processes must be completed within guaranteed time constraintsFlight control, pacemakers, ABS
DistributedOS coordinates across multiple connected computersHadoop clusters, Google's infrastructure
EmbeddedMinimal OS embedded in a device, dedicated to specific tasksSmart TVs, routers, washing machines
Network OSManages network resources and shared peripheralsWindows Server, Novell NetWare
Exam tip: When describing OS functions, use precise terminology: "process scheduling," "memory allocation," "file access control." Do not say "the OS controls everything" — be specific about which function you are describing.
Exam tip: Know the three process states (Running, Ready, Waiting/Blocked) and be able to draw or describe the transitions between them. Know what a PCB contains.
⚠ Common Mistakes
  • Confusing process management with memory management — they are separate OS functions, though related.
  • Saying an OS "runs programs" — say it "manages processes" and "schedules CPU time."
  • Forgetting that a RTOS has guaranteed response time — the critical differentiator from regular multi-tasking OS.
✓ Notes completed!
Video coming soon
Click to advance · Arrow keys also work
Click slide or press arrow keys to navigate

Worksheet — 1.2.1a Operating System Functions

8 questions · 20 marks · instantly marked

Q1State four functions of an operating system, other than providing a user interface.[4 marks]
✓ Mark scheme
One mark each for any four: memory management [1]; process management/scheduling [1]; I/O management [1]; file management [1]; security management/user authentication [1]; providing a hardware abstraction layer [1].
Q2Explain what a Process Control Block (PCB) is and describe three pieces of information it contains.[4 marks]
✓ Mark scheme
A PCB (Process Control Block) is a data structure the OS maintains for each process [1]; containing any three from: process ID (unique identifier) [1]; current process state (running/ready/waiting) [1]; program counter (address of next instruction to execute) [1]; CPU register values (to allow context switching) [1]; memory management information (base/limit registers, page table pointer) [1]; I/O status (devices in use, open files) [1].
Q3Describe the three process states and explain the transitions between them.[4 marks]
✓ Mark scheme
Running: process is actively executing instructions on the CPU [1]; Ready: process is waiting to be allocated CPU time (all resources available except CPU) [1]; Waiting/Blocked: process is waiting for an external event such as I/O completion before it can continue [1]; key transitions: Running → Waiting (process requests I/O); Waiting → Ready (I/O completes, interrupt received); Ready → Running (scheduler allocates CPU time); Running → Ready (time quantum expires/preempted) [1].
Q4Explain what a context switch is and why it is necessary for multi-tasking.[3 marks]
✓ Mark scheme
A context switch is when the OS saves the state of the currently running process to its PCB [1] and restores the saved state of another process from its PCB so it can continue executing [1]; it is necessary because only one process can use the CPU at a time, so to switch between processes without losing their execution state, the OS must save and restore all register values and the program counter [1].
Q5Distinguish between a multi-user OS and a real-time OS (RTOS). Give one example of each.[4 marks]
✓ Mark scheme
Multi-user OS: allows multiple users to access the same system concurrently, with the OS managing resource isolation and access control between users [1]; e.g. Linux server / UNIX mainframe [1]; Real-time OS (RTOS): processes must be completed within strict, guaranteed time constraints; missing a deadline may cause system failure [1]; e.g. flight control system / pacemaker / ABS braking system [1].
Q6Explain what spooling is and give an example of its use.[2 marks]
✓ Mark scheme
Spooling (Simultaneous Peripheral Operations On-Line): data for a slow peripheral device is queued in a buffer (spooler) so the CPU can continue processing other tasks rather than waiting for the slow device to finish [1]; example: a print spooler queues multiple print jobs for a printer so the CPU is freed immediately after sending the job [1].
Q7Give one advantage and one disadvantage of a CLI compared to a GUI as a user interface type.[2 marks]
✓ Mark scheme
Advantage of CLI: commands can be scripted/automated; uses fewer system resources (no graphics rendering); faster for experienced users [1]; Disadvantage of CLI: requires memorisation of commands; steep learning curve; less intuitive for general users who lack computing knowledge [1].
Q8Describe two ways in which the OS provides security for a computer system.[2 marks]
✓ Mark scheme
Any two: user authentication — verifying user identity via username and password (or biometrics/2FA) before granting access [1]; access control — enforcing permissions on files/directories so only authorised users or processes can read/write/execute them [1]; memory protection — preventing processes from accessing each other's memory spaces [1]; built-in firewall — controlling inbound/outbound network traffic to prevent unauthorised access [1].
Topic Quiz
1 of 15
You scored
out of 15
🎯

Mini Test — 1.2.1a OS Functions

  • 10 questions · 10 marks · 10 minutes
  • 5 MCQ + 5 short answer
Card 1 of 15
Click to reveal
🎉
Complete!
TermDefinition
← 1.1.3c Cloud & Virtual Storage 1.2.1 Systems Software Next: 1.2.1b Memory Management →