Study Guide

Operating Systems

CIE A-Level Computer ScienceΒ· Unit 5: System Software, Topic 1Β· 10 min read

1. Core Purpose and Functions of Operating Systemsβ˜…β˜…β˜†β˜†β˜†β± 3 min

An operating system (OS) is a collection of system programs that acts as an intermediary between computer hardware, end users, and application software. Its primary role is to manage shared resources and provide a stable, secure environment for applications to run.

πŸ“˜ Definition

Operating System

System software that manages computer hardware and software resources, and provides common services for application programs.

Example:

Windows 11, Linux, macOS, Android

  • Processor management: Scheduling processes for CPU access

  • Memory management: Allocating and deallocating RAM to running processes

  • I/O management: Controlling communication with peripherals

  • File management: Organizing data storage on secondary storage

  • Resource allocation: Ensuring fair and secure access to shared resources

  • User interface: Providing a CLI or GUI for user interaction

πŸ“ Worked Example

List three key functions of an operating system, and give one practical example of each.

  1. 1

    Identify 3 functions with clear practical examples:

  2. 2
    1. Memory management: Allocating 2GB of RAM to a web browser when it launches, and reclaiming the memory when the browser closes.
  3. 3
    1. I/O management: Buffering keyboard input for a word processor, to avoid lag when a user types quickly.
  4. 4
    1. File management: Tracking which blocks of an SSD belong to each user document, and organizing files into folders.

Exam tip:

Always link each function to its purpose for full marks, don't just list function names.

2. Types of Operating Systemsβ˜…β˜…β˜†β˜†β˜†β± 4 min

Operating systems are classified by their use case and processing model. CIE 9618 regularly tests distinctions between the most common types:

  • Batch OS: Group similar non-interactive jobs into batches for processing on mainframes, no user interaction mid-processing

  • Multiprogramming OS: Load multiple programs into memory at once, switch the CPU between them to keep it busy when one waits for I/O

  • Time-sharing OS: Allocate CPU time slices to multiple processes, creating the illusion of simultaneous execution for interactive users

  • Real-time OS: Guarantee maximum response time to meet strict deadlines, used for safety-critical embedded systems

  • Distributed OS: Manages a network of independent computers, presents them as a single unified system to users

πŸ“ Worked Example

Explain why a real-time operating system is used for a car's anti-lock braking system instead of a general purpose OS.

  1. 1
    1. Anti-lock braking requires braking adjustments to be made within a very strict short deadline to avoid skidding.
  2. 2
    1. Real-time operating systems are designed to guarantee a maximum response time to interrupts and process requests.
  3. 3
    1. General purpose OS prioritize throughput and fairness, leading to unpredictable response delays that would make the system unsafe.
  4. 4
    1. Therefore real-time OS is required to meet the timing constraints of the safety-critical system.

3. Privilege Levels: Kernel vs User Modeβ˜…β˜…β˜…β˜†β˜†β± 4 min

The kernel is the core part of the operating system that stays resident in memory when the system runs. To protect the system from faulty or malicious applications, most modern OS use two distinct privilege levels for code execution.

πŸ“˜ Definition

Privilege Levels

KernelMode/UserModeKernel Mode / User Mode

Two processor modes that separate OS kernel code from application code. Kernel mode grants full access to all hardware and memory, while user mode restricts access to protect system stability.

πŸ“ Worked Example

Describe what happens when an application requests to read data from a file on the hard disk.

  1. 1
    1. The user application issues a system call to the operating system to request the read operation.
  2. 2
    1. The processor switches from user mode to kernel mode to execute the OS kernel code handling the request.
  3. 3
    1. The kernel checks the application has permission to access the file, then schedules the I/O operation with the disk controller.
  4. 4
    1. Once the I/O completes, the kernel copies the requested data from kernel memory to the application's user memory space.
  5. 5
    1. The processor switches back to user mode, and control is returned to the application with the requested data.

4. CPU Scheduling Algorithmsβ˜…β˜…β˜…β˜†β˜†β± 5 min

CPU scheduling selects which ready process gets access to the CPU next. The goal is to maximize system throughput, minimize waiting time, and ensure fairness. The most common algorithms tested in 9618 are summarized below:

Algorithm

Type

Key Property

First Come First Served (FCFS)

Non-preemptive

Schedules by arrival order, causes convoy effect

Shortest Job First (SJF)

Non-preemptive

Schedules shortest burst first, minimum average waiting time

Round Robin

Preemptive

Each process gets a fixed time slice, ideal for time-sharing

Shortest Remaining Time First

Preemptive

Preemptive SJF, higher overhead

πŸ“ Worked Example

Three processes arrive at time 0, with burst times: P1 = 4ms, P2 = 2ms, P3 = 6ms. Calculate the average waiting time for FCFS and SJF scheduling.

  1. 1

    For FCFS scheduling, processes run in arrival order: P1 β†’ P2 β†’ P3

  2. 2

    Waiting time = time spent waiting for CPU: P1 = 0ms, P2 = 4ms, P3 = 4 + 2 = 6ms

  3. 3

    Average waiting time = (0 + 4 + 6) / 3 = 10 / 3 β‰ˆ 3.33ms

  4. 4

    For SJF scheduling, processes run in order of shortest burst first: P2 β†’ P1 β†’ P3

  5. 5

    Waiting times: P2 = 0ms, P1 = 2ms, P3 = 2 + 4 = 6ms

  6. 6

    Average waiting time = (0 + 2 + 6) / 3 = 8 / 3 β‰ˆ 2.67ms, which matches the expected result that SJF has lower average waiting time.

5. Common Pitfalls

Wrong move:

Confusing batch operating systems with multiprogramming OS

Why:

Both handle multiple jobs, but they have different core structures

Correct move:

Batch OS groups non-interactive jobs with no user input mid-run, while multiprogramming OS runs multiple jobs concurrently and switches the CPU between them.

Wrong move:

Mixing up preemptive and non-preemptive scheduling definitions

Why:

Many candidates assume all modern scheduling is preemptive

Correct move:

FCFS and non-preemptive SJF do not pre-empt running processes: the process keeps the CPU until it finishes or releases it. Only round robin and SRTF are preemptive.

Wrong move:

Confusing user mode and kernel mode privileges

Why:

Candidates often reverse the privilege levels

Correct move:

Only the kernel runs in kernel mode with full hardware access. Applications run in user mode with restricted access, and use system calls to request kernel services.

Wrong move:

Incorrectly calculating waiting time for scheduling problems

Why:

Waiting time is often confused with turnaround time

Correct move:

Waiting time = Turnaround time - Burst time. Turnaround time is total time from arrival to finish, while waiting time is only the time spent waiting for the CPU.

Wrong move:

Claiming real-time OS are just 'faster' than general purpose OS

Why:

The key defining feature of real-time OS is often misunderstood

Correct move:

Real-time OS guarantee predictable, bounded response time, not just raw speed. This is critical for safety-critical systems where delays can cause failure.

6. Quick Reference Cheatsheet

Concept

Key Summary

Core OS Functions

CPU, memory, I/O, file, resource management, UI

Real-time OS

Guaranteed response time, safety-critical systems

Kernel Mode

Full hardware access, OS kernel only

User Mode

Restricted access, for applications only

FCFS Scheduling

Order of arrival, non-preemptive

SJF Scheduling

Shortest burst first, minimum average wait

Round Robin

Fixed time slice, preemptive, time-sharing

7. Frequently Asked

What is the difference between kernel mode and user mode?

Kernel mode is a high privilege level where the OS kernel runs, with full access to all hardware and system memory. User mode is a restricted privilege level for applications, where direct hardware access is blocked. Applications must use system calls to request the kernel perform operations on their behalf.

When this came up on past exams

AI-estimated based on syllabus patterns β€” cross-check with official past papers for accuracy. Use only as revision-focus signals.

  • 2022 Β· 2

    OS functions question

  • 2023 Β· 2

    Scheduling calculation

  • 2024 Β· 2

    Types of operating systems

What's Next

This topic is the foundation for all further system software topics in CIE 9618 Unit 5. Core OS concepts like resource management underpin memory allocation, virtual memory, and file system organisation, which are the next topics you will study. Scheduling and privilege level questions regularly appear as 4-8 mark questions in Paper 2, so mastering the definitions and calculations here will help you score highly on these common exam questions. This topic also connects to earlier learning on processor architecture and I/O interrupts from Unit 4.