16.1 Purposes of an Operating System (OS)


2026 Syllabus Objectives

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

  • Show understanding of how an OS can maximise the use of resources.
  • Describe the ways in which the user interface hides the complexities of the hardware from the user.
  • Show understanding of process management, including:
    • The concept of multi-tasking and a process.
    • The process states: running, ready, and blocked.
    • The need for scheduling and the function and benefits of different scheduling routines (round robin, shortest job first, first come first served, shortest remaining time).
    • How the kernel of the OS acts as an interrupt handler and how interrupt handling is used to manage low-level scheduling.
  • Show understanding of virtual memory, paging, and segmentation for memory management, including:
    • The concepts of paging, virtual memory, and segmentation.
    • The difference between paging and segmentation.
    • How pages can be replaced.
    • How disk thrashing can occur.

1. What Is an Operating System?

An operating system (OS) is a large piece of software that acts as a bridge between the user, the applications they run, and the physical hardware of the computer. Without an OS, a user would need to write extremely complex instructions just to do something as simple as save a file or print a document. The OS handles all of this behind the scenes.

Think of the OS as a manager in a large office. The office has many workers (hardware components like the CPU, memory, printer, and keyboard), and the manager makes sure every worker is given the right task at the right time, that no two workers clash, and that the office runs efficiently.

The three main resources the OS manages are:

  • The CPU (Central Processing Unit) — the brain of the computer that carries out instructions.
  • Memory (RAM) — the short-term workspace where programs and data are stored while in use.
  • Input/Output (I/O) devices — things like keyboards, printers, monitors, and hard drives.

2. How the OS Maximises the Use of Resources

2.1 Starting Up: The Bootstrap Program

When you switch on a computer, the very first thing that happens is a tiny program called the bootstrap program runs. This program is stored in a chip called the BIOS (Basic Input/Output System), which is found in ROM (Read-Only Memory) — a type of memory that keeps its contents even when the power is off. The bootstrap program's job is to load the operating system from the hard drive (or flash storage, on phones and tablets) into RAM so the computer can begin working properly.

On tablets and smartphones, the OS is often stored in flash memory — a special type of storage that is divided into two sections: one read-only section that holds the OS itself, and a second section where apps and user data are stored.

2.2 The Kernel: The Core of the OS

The kernel is the most important part of the operating system. It is the central component that sits between all software (applications) and the physical hardware. Every time a program wants to use a piece of hardware — for example, when a word processor wants to save a file to disk — it must ask the kernel for permission and assistance. The kernel then communicates directly with the hardware to make it happen.

The kernel is responsible for five key areas:

  • Process management — deciding which programs run, for how long, and in what order.
  • Memory management — allocating portions of RAM to each running program and making sure programs do not interfere with each other's memory.
  • Device management — communicating with input/output devices using special software called device drivers.
  • Interrupt handling — responding to signals from hardware or software that require immediate attention.
  • File management — organising how data is read from and written to storage devices.

2.3 CPU Resource Management: Scheduling

The CPU can only execute one instruction at a time, yet modern computers appear to run dozens of programs simultaneously. This illusion is created through scheduling — the process by which the OS rapidly switches the CPU's attention between different programs (called processes), giving each a very short burst of time in turn. Because this switching happens so fast (millions of times per second), it appears as though everything is running at the same time.

2.4 Memory Resource Management

RAM is limited. The OS must carefully allocate portions of RAM to each active program. If RAM becomes full, the OS can use a technique called virtual memory (explained in detail later) to temporarily move less-used data onto the hard drive, freeing up space in RAM for more urgent tasks.

2.5 Input/Output Management and Direct Memory Access (DMA)

Input/output devices such as keyboards, printers, and hard drives operate much more slowly than the CPU. If the CPU had to wait for every I/O operation to complete before doing anything else, it would waste enormous amounts of time doing nothing.

To solve this, the OS uses two key techniques:

Device drivers are small software programs that the OS uses to communicate with specific hardware devices. Each type of device (printer, keyboard, graphics card) has its own driver that acts as a translator between the OS and that device.

Direct Memory Access (DMA) is a feature that allows certain hardware devices to transfer data directly to and from RAM without needing the CPU's involvement for every step. Here is how it works step by step:

  1. A device (for example, a hard drive) needs to transfer data to memory.
  2. The DMA controller takes over and manages this data transfer independently.
  3. While this transfer is happening, the CPU is free to carry out other tasks.
  4. Once the data transfer is complete, the DMA controller sends a special signal — called an interrupt — to the CPU to inform it that the transfer is done.

This makes the system much more efficient because the CPU is not wasted sitting idle while data moves from one place to another.

Sign in to view full notes