IB Computer Science2027 syllabus
Level view
A1.3.2

Functions of an operating system

SL & HL40 min readLesson

In one sentence: An operating system preserves system integrity and keeps background services stable by coordinating nine interconnected functions: memory management, file management, device management, scheduling, security, accounting, graphical user interfaces, virtualization, and networking.

What you will learn

By the end of this lesson, you should be able to:

  • Explain how the operating system maintains system integrity while running background operations alongside user applications.
  • Describe how the OS performs memory management (including process isolation and virtual memory), file system operations (including directories, file extensions, and defragmentation), and device management (drivers, buffering, caching, spooling, and Plug and Play).
  • Explain the purpose of scheduling, security (authentication, encryption, auditing, malware protection), and accounting (resource tracking, quotas, monitoring, billing).
  • Describe how the graphical user interface (GUI) (including accessibility), virtualization (hypervisors and VMs), and networking (interfaces, protocols, network security) operate.

Before you begin

Read The role of operating systems (A1.3.1) first. That lesson explains why the OS abstracts hardware as a single layer; this lesson examines the specific functional subsystems inside that layer that keep modern computers stable, responsive, and secure.

Key words

TermSimple meaning
System integrityKeeping software execution, memory regions, and stored data accurate, isolated, and free from unauthorized interference or crashes.
Virtual memoryExtending physical RAM by temporarily swapping lower-priority process data onto secondary storage (HDD/SSD).
DefragmentationReorganizing scattered file blocks on a mechanical hard disk drive (HDD) into contiguous sequences to speed up reading and writing.
Buffering / Caching / SpoolingBuffering smooths transfer-speed mismatches; caching keeps frequently used data fast to reach; spooling queues sequential I/O jobs (such as printing).
Plug and Play (PnP)OS capability that automatically detects newly connected hardware and installs/configures its driver without manual setup.
AccountingOS tracking of CPU, RAM, disk, and network consumption per process and user for quotas, bottleneck detection, auditing, and billing.
HypervisorSoftware that creates, isolates, and manages multiple virtual machines (VMs) sharing one physical computer's hardware.
MalwareMalicious software (viruses, worms, trojans, spyware, ransomware) designed to harm systems, steal information, or disrupt operations.

The idea, step by step

Maintaining system integrity while running background operations

Even when a user runs only one visible program, such as writing an essay, the operating system executes dozens of background operations: monitoring temperature and power, flushing disk buffers, checking network packets, scanning files for threats, tracking resource limits, and handling timer ticks. Maintaining system integrity ensures that neither a misbehaving application nor concurrent background services corrupt OS structures, crash other programs, or expose private data. The OS achieves this through strict memory separation, privilege boundaries between users and administrators, continuous logging, and the nine core functions below.

1. Memory management

Whenever you launch a program, the OS locates its executable file in secondary storage and loads its code and initial data into primary memory (RAM). While running, memory management performs three continuous duties:

  • Dynamic allocation and de-allocation: Grants extra RAM when a program requests memory and reclaims freed RAM cleanly when tasks finish.
  • Process isolation: Confines each running process to its own protected memory address range so one frozen or compromised program cannot read or overwrite another program's memory, preserving system stability and security.
  • Virtual memory: When active programs demand more memory than physically fits in RAM, the OS reserves space on an HDD or SSD to serve as virtual memory, moving lower-priority inactive blocks out to disk while keeping higher-priority active pages in RAM. Because secondary storage is much slower than physical RAM, heavy virtual-memory swapping reduces overall performance, though it stops applications from crashing out of memory.

2. File system (file management)

The file system organizes persistent data across secondary drives into a logical hierarchical (tree-like) directory structure of folders and subfolders:

  • Standard operations: Creating, reading, writing, deleting, renaming, moving, and copying files and directories.
  • Consistency and types: Enforces unique filenames within the same directory and uses file extensions (such as .docx, .jpg, or .exe) to associate files with the right software.
  • Storage optimization and maintenance: Tracks free and allocated disk blocks. Over time, repeated creates, edits, and deletions on a mechanical hard disk drive (HDD) scatter pieces of a single file across non-adjacent tracks (fragmentation). Running defragmentation rearranges those file fragments into contiguous blocks, reducing read/write head movement and improving HDD access speed.

3. Device management

Applications do not send raw electrical commands directly to a printer or SSD. Instead, device management routes I/O through device drivers, which are specialized programs tailored to each piece of hardware that present a uniform software interface to the OS and applications.

To keep faster CPUs from stalling on slower mechanical or external devices, the OS uses three distinct I/O techniques:

TechniqueHow it worksTypical example
BufferingHolds incoming or outgoing streams temporarily in RAM to absorb speed mismatches between sender and receiver.Streaming audio packets into a playback buffer so sound does not stutter.
CachingKeeps copies of frequently accessed data in faster storage for quick repeated retrieval.Keeping recently read disk blocks in fast RAM cache to avoid repeated drive reads.
SpoolingPlaces complete sequential jobs into a managed queue so slow devices process one job cleanly at a time without interleaved data.Queuing print jobs from multiple applications so Page 2 of Document A never prints inside Document B.

Modern device management also provides Plug and Play (PnP) to detect newly attached peripherals and configure drivers automatically, performs error detection and recovery (resetting unresponsive hardware or notifying the user), and enforces access control so only authorized users or processes reach sensitive hardware.

4. Scheduling

In a multitasking system, dozens of user programs and background OS services compete for CPU cores simultaneously. The OS scheduler decides which ready process runs next and for how long, aiming to maximize throughput, prevent any single task from monopolizing the CPU, keep the interface responsive, and maintain overall stability. (Different CPU scheduling algorithms, including first-come first-served, round robin, multilevel queue, and priority scheduling, are compared in A1.3.3.)

5. Security

OS security protects the confidentiality, integrity, and availability of stored data and running systems through four complementary layers:

  1. User authentication and access rights: Verifies identity at sign-in via passwords, biometrics (fingerprints, facial recognition), or security tokens, then enforces per-user permissions (for instance, preventing a standard user from altering administrator system files).
  2. Encryption: Scrambles files, entire disks, or network links so intercepted storage or traffic remains unreadable without the decryption key.
  3. Auditing and monitoring: Records system logins, file accesses, system errors, and administrative changes in system event logs so suspicious activity or faults can be traced quickly.
  4. Malware protection: Integrates or coordinates antivirus scanners, firewalls, and intrusion detection systems (IDS) to block unauthorized access and stop malicious software including viruses (attach to legitimate files), worms (self-replicate across networks), trojans (hide malicious code inside legitimate-looking applications), spyware, and ransomware.

6. Accounting

OS accounting continuously measures how much of each hardware resource individual processes and user accounts consume:

  • Resource usage tracking: Records CPU time, RAM allocated, disk space occupied, and network volume transferred.
  • Process accounting: Logs each process's ID (PID), owner user ID, start/end timestamps, execution duration, and I/O consumption.
  • User accounting and quotas: Allocates usage costs across departments and enforces quotas (maximum disk or memory limits) so no user can exhaust shared storage or RAM.
  • Performance monitoring and auditing: Helps administrators identify bottlenecks, spot underutilized hardware, plan upgrades from usage trends, audit policy compliance, and compute usage-based billing or departmental chargeback (important in universities and cloud data centres).

7. Graphical user interface (GUI)

Most desktop and mobile operating systems expose a graphical user interface (GUI) built around visual elements: windows, icons, menus, and pointers (WIMP), so users navigate without memorizing text commands:

  • Window and file workflows: Supports rapid task switching (Alt + Tab), tiling/snapping windows side by side, graphical file explorers (drag-and-drop, sort, filter), and visual settings panels.
  • Visual feedback and personalization: Shows progress bars, loading indicators, pop-up notifications, and hover tooltips, while allowing customizable themes, desktop shortcuts, and widgets.
  • Accessibility features: Essential built-in tools such as screen readers (converting on-screen text and controls to speech or Braille), high-contrast colour themes, screen magnifiers, and full keyboard navigation shortcuts ensure users with visual or motor impairments can use the computer effectively.

8. Virtualization

Modern operating systems support running virtual machines (VMs), which are complete simulated computers each running an independent guest OS and applications inside a single physical host. A software layer called a hypervisor partitions and schedules the physical CPU, memory, and storage across those VMs.

Virtualization provides major operational benefits:

  • Fault and security isolation: A crash or malware infection inside one VM stays contained away from the host and neighbouring VMs.
  • Snapshots and live migration: Administrators can save a VM's exact state before an update (rollback on failure) or move live VMs between physical servers for maintenance and load balancing without shutting services down.
  • Disaster recovery and cloud elasticity: VMs are portable files that can be backed up, restored quickly after hardware failure, and scaled dynamically across cloud infrastructure.

9. Networking

Finally, an operating system manages how the computer communicates across LANs, WANs, and the internet:

  • Interface setup and addressing: Controls physical and wireless network interface cards (NICs) and automatically acquires network settings and IP addresses via DHCP.
  • Protocol implementation: Executes transport and network protocols such as TCP/IP (handling packetization, addressing, error checking, flow control, and congestion avoidance) while exposing standard services for higher-level protocols such as HTTP (web), FTP (file transfer), and SMTP (email).
  • Network security: Enforces software firewalls filtering traffic by rules, supports encrypted communication channels, and manages Virtual Private Networks (VPNs) to protect privacy over untrusted public networks.

Worked example

Consider a university computer-science workstation running during a busy afternoon lab session while an automated background backup also runs:

  1. System integrity and security: A student signs in with a standard account and hardware MFA token; OS permissions ensure the student can access their /home/student directory (file system) while preventing them from editing system security logs (auditing) or disabling the background antivirus scanner (security).
  2. Memory and scheduling: While the student compiles code inside an isolated Linux virtual machine (virtualization, managed by a hypervisor), the OS scheduler shares CPU time between the VM, a PDF reader, and the background backup daemon, while memory management isolates each process's RAM and moves idle pages to virtual memory if RAM fills up.
  3. Devices, GUI, networking, and accounting: When the student prints a report, spooling (device management) queues the print job behind another classmate's document over the campus network (networking via TCP/IP and DHCP), a GUI progress notification pops up (graphical user interface), and OS accounting charges the printed quota and logs departmental CPU and storage usage.

Every OS function runs simultaneously while protecting overall system stability.

Check your understanding

  1. Distinguish buffering, caching, and spooling in OS device management, giving one clear scenario for each.
  2. Explain how virtual memory helps a computer continue running when RAM is full, and state the main trade-off.
  3. Why does defragmentation improve file-access speed on a mechanical hard disk drive?
  4. Name three categories of data tracked by OS accounting and give one administrative reason for collecting them.

Common mix-up

It is easy to think: Virtual memory gives a computer extra physical RAM speeds, or buffering and spooling mean the exact same thing.

Instead, remember: Virtual memory lives on much slower secondary storage (HDD/SSD), so heavy paging slows the system down compared with real RAM. Buffering smooths continuous stream speed mismatches between fast and slow devices, whereas spooling queues discrete, complete jobs (such as print files) so multiple outputs stay separated in order.

Quick recap

  • The OS maintains system integrity across constant background operations through isolation, privilege boundaries, logging, and coordination.
  • Core operational functions include memory management (allocation, isolation, virtual memory), file system (hierarchical folders, operations, extensions, defragmentation), device management (drivers, buffering, caching, spooling, PnP), and scheduling.
  • Protection and tracking rely on security (authentication, encryption, auditing logs, malware defence) and accounting (usage tracking, quotas, bottlenecks, chargeback).
  • User and infrastructure layers rely on GUI (WIMP, feedback, accessibility), virtualization (hypervisors, isolated VMs, snapshots, live migration), and networking (NICs, DHCP, TCP/IP, firewalls, VPNs).

Textbook reading

  • Computer Science (Baumgarten, Ganea, Turland, 2025), A1 Computer fundamentals > A1.3 Operating systems and control systems > A1.3.2 Functions of an operating system, Book pp. 68–78 (PDF pp. 78–88).
  • Read these pages to inspect the full UI screenshots and diagrams (including Windows Event Viewer and Ubuntu accessibility menus); this original explanation does not replace the textbook.

Sources and further learning

  • IB Computer Science Guide (first assessment 2027), A1.3.2: Describe the functions of an operating system (Guide p. 30; PDF p. 36).
  • Computer Science (Baumgarten, Ganea, Turland, 2025), A1.3.2 Functions of an operating system, Book pp. 68–78 (PDF pp. 78–88). All comparison tables and worked scenarios above are original.
Check your understanding6 questions · 10 marks · 12 min
Take the lesson check
Something not right?