SLIDE 1 / 10
CSZone.co.uk
Click anywhere to advance · Arrow keys also work
AQA 7517 · Paper 2 · 4.6.3a

Operating System
Functions

Memory · Process · File · Device management · Section 4.6

WHAT YOU'LL LEARN
Memory management · Process scheduling · Virtual memory · Device drivers · CLI vs GUI
AQA SPEC LINK
4.6.3 — Operating system functions in detail
Memory Management

Memory Management

OS allocates portions of RAM to each running process to prevent processes accessing each other's memory
Paging — RAM divided into fixed-size frames; programs divided into same-size pages; pages loaded as needed
Segmentation — program divided into logical sections (code, stack, heap) of varying size
Virtual memory — uses part of secondary storage as if it were RAM; allows programs larger than physical RAM to run
Virtual Memory

Virtual Memory in Detail

When RAM is full, the OS moves least recently used pages to a page file on the hard drive, freeing RAM for active processes. Called paging/swapping.
Page fault — when a needed page is not in RAM; OS must fetch it from disk (slow)
Thrashing — system spends more time swapping than running code; caused by insufficient RAM
Solution to thrashing: add more RAM or close applications
Process Management

Process Scheduling

A process is a program in execution. The OS manages multiple processes concurrently
Round Robin — each process gets a fixed time slice (quantum); fair but can be slow for I/O-bound tasks
Priority scheduling — higher priority processes get CPU first; lower priority may starve
Process states: Running (on CPU) → Ready (waiting for CPU) → Waiting (waiting for I/O)
Context switching — OS saves current process state and restores another; enables multitasking
File Management

File System Management

OS provides a file system — organises files in directories/folders (hierarchical structure)
Manages: creating, reading, writing, deleting, renaming, moving files
Permissions — read (r), write (w), execute (x) for owner, group, others
File allocation — tracks which disk blocks belong to which file (FAT, NTFS, ext4)
Buffering — temporarily holds I/O data in memory to speed up transfers
Device Management

Device Drivers & I/O

A device driver is software that allows the OS to communicate with specific hardware. Each device (printer, graphics card, USB) needs its own driver.
Plug-and-play — OS detects new hardware and installs appropriate driver automatically
Spooling — queueing documents for a printer; OS manages the queue so users aren't blocked
Interrupt handling — CPU processes hardware interrupts (keyboard press, disk read complete) via OS interrupt handler
User Interface

CLI vs GUI

CLI — Command Line Interface
Text commands typed by user. Fast, scripting, low resources. Used by developers, sysadmins. Examples: bash, PowerShell, cmd
GUI — Graphical User Interface
Windows, icons, menus, mouse. Easy for non-technical users. More RAM/processing needed. Examples: Windows, macOS, Android
Security

OS Security Features

Authentication — username/password, biometrics, two-factor authentication to verify identity
Access control — users only access files/resources they have permission for (principle of least privilege)
Encryption — BitLocker (Windows), FileVault (Mac) encrypt entire drives
Audit logs — records who accessed what and when; detects breaches
Firewall — OS built-in firewall monitors network traffic (Windows Defender Firewall)
AQA Exam Style

Practice Question

AQA 7517 — Paper 2 Style
(a) Explain what is meant by 'virtual memory' and describe ONE disadvantage of using it. [3]
(b) Describe what happens during a context switch in a process scheduler. [2]
(c) Give TWO reasons why a developer might prefer a CLI over a GUI. [2]
[7 marks]
3 marks
(a) Virtual memory uses secondary storage (hard drive) as an extension of RAM [1], allowing programs larger than physical RAM to run [1]. Disadvantage: accessing disk is much slower than RAM, causing performance degradation/thrashing [1]
2 marks
(b) OS saves the state (registers, program counter, etc.) of the current process to memory [1], loads the saved state of the next process to be run [1]
2 marks
(c) Any 2: faster for repetitive tasks / can be scripted/automated / uses less memory / more precise control / can be used over SSH
Summary

Key Points to Remember

Memory management — RAM allocation, paging, segmentation, virtual memory (uses disk)
Process scheduling — Round Robin, priority; process states: running/ready/waiting
File management — hierarchical directories, permissions, file allocation tables
Device drivers — bridge between OS and hardware; spooling for printers
CLI: powerful/scriptable; GUI: easy/visual; OS provides both options
🎉 Lesson complete — move to the quiz!