SLIDE 1 / 11
CSZone.co.uk
OCR H446 · Component 1 · 1.2.1

Operating System
Functions

OCR A Level Computer Science · cszone.co.uk
H446 SpecA Level
Learning Objectives

By the end of this topic you will be able to:

List and describe the main functions of an operating system
Explain process management and scheduling
Describe memory management, I/O management and file systems
Explain the role of the OS as an interface between user, applications and hardware
OS Functions

What does the OS do?

The operating system is system software that manages computer hardware and software resources. It provides an interface between the user/applications and the hardware, abstracting complexity away.
Process management: creates, schedules and terminates processes
Memory management: allocates and protects memory for processes
File system management: organises files in directories; handles read/write
I/O management: controls communication with peripherals via drivers
Security management: user authentication, access control
User interface: CLI or GUI for user interaction
Process Management

Processes and the OS

A process is a program in execution. The OS maintains a Process Control Block (PCB) for each process: stores PID, state, PC value, register values, priority, and memory allocation.
Process states: New → Ready → Running → (Blocked/Waiting) → Terminated
Context switching: OS saves the PCB of the current process and restores the PCB of the next. Enables multitasking on a single CPU core.
Multitasking: interleaving processes rapidly creates the illusion of simultaneous execution. The OS scheduler decides which process runs next.
Memory Management

Memory Management

Allocation: OS allocates blocks of RAM to each process. Ensures each process has the memory it needs without overwriting another process’s data.
Protection: each process is restricted to its own memory region. Attempting to access another process’s memory causes a segmentation fault; OS terminates the offending process.
Relocation: OS can move process data in RAM and update pointers, allowing dynamic memory allocation and compaction to reduce fragmentation.
Sharing: some memory regions (e.g. shared libraries, DLLs) are shared between processes to avoid duplication.
File Systems & I/O

File System Management and I/O

File System
Organises files in a hierarchical directory structure. Manages metadata (name, size, date, permissions). Handles file creation, deletion, reading and writing. Examples: NTFS, FAT32, ext4, APFS.
I/O Management
Manages communication between CPU and I/O devices via device drivers. Buffers data (stores temporarily while speed is matched). Handles interrupts from devices. Provides uniform interface regardless of hardware.
The OS abstracts hardware differences: an application calls the same file-write function whether saving to HDD, SSD, or network drive — the OS and driver handle the details.
Security

OS Security Management

User authentication: username/password, biometrics, multi-factor; verifies identity before granting access
Access control: permissions define what each user/process can read, write or execute (UNIX: rwx for owner/group/others)
Process isolation: OS ensures one process cannot access or corrupt another process’s memory space
Encryption: OS may provide file-system level encryption (e.g. BitLocker on Windows) to protect data at rest
Security is an A Level addition — at GCSE you only need basic OS roles. At A Level, explain WHY each security function is necessary.
Exam Practice
OCR H446 Style · 4 marks
Describe the role of the operating system in managing processes. Include reference to the Process Control Block (PCB) and context switching.
[4 marks]
1
The OS creates and maintains a PCB for each process, storing: PID, process state, register values (PC, GPRs), memory allocation and priority.
1
The scheduler selects which process runs next based on its scheduling algorithm.
1
Context switching: OS saves the PCB of the running process when it is preempted or blocks.
1
The OS restores the PCB of the next chosen process, loading its saved register values so it resumes exactly where it left off.
Common Mistakes

Don’t Lose Marks

!
Saying the OS “runs programs” without explaining how — always mention process management, scheduling, and PCBs when asked about OS process control.
!
Confusing memory allocation with file system management. Memory management is about RAM (during execution). File systems manage persistent storage (HDD/SSD).
!
Forgetting context switching stores ALL register values — not just the PC. The entire CPU state (all GPRs, flags, SP) must be saved to the PCB for the process to resume correctly.
1.2.1a Complete
Well done! ✓
Operating System Functions
Return to lesson to continue