Established 2026  ·  Free Educational Resources for All

Computer & AI · Computing Fundamentals

Operating Systems: The Software Behind Every Device

Every tap and app launch passes through one piece of software first. This guide explains how the operating system boots, shares the processor, protects memory, organises files and keeps you safe, with diagrams and worked calculations.

EDUSAMBAM Editorial Team | 17 min read | Computing Fundamentals |Last updated: October 2026
🔊 LISTEN TO THIS ARTICLE
SAVE YOUR EYES • IMPROVE YOUR LISTENING
Listen to the article instead of relying only on continuous screen reading.
Ready to read the article.

Every time you tap an icon, save a file or switch between apps, one piece of software is quietly doing the work in the background: the operating system, or OS. It decides which program gets the processor next, keeps each app out of the others' memory, remembers where every file lives, and talks to the screen, speakers, camera and battery so that apps do not have to. You rarely notice it, because when it works well everything simply feels easy. This guide explains what an operating system does, step by step, with diagrams and worked calculations, and how Windows, macOS, Linux, Android and iOS are related and different.

Helpful background: How Computers Work introduces the processor, memory and storage that the operating system manages.

1.The Middle Layer Between Apps and Hardware

Imagine if every app had to include its own instructions for every kind of screen, keyboard, storage drive and camera ever made. That would be enormous, error-prone work, and two apps could easily clash by trying to control the same device at the same moment. An operating system solves this by sitting in the middle. It manages the hardware once, and offers every app a simple, standard set of requests such as "open this file", "draw this on the screen" or "send this over the network".

The operating system sits between apps and hardware Layers from top to bottom: you, apps, the operating system containing the kernel and drivers, and the hardware: processor, memory, storage, screen and network. Apps ask the operating system through system calls, and the operating system controls the hardware. Where the operating system sits You: taps, clicks, typing Apps browser · messages · games · word processor Operating system Kernel Device drivers Hardware: processor · memory · storage · screen · network
Figure 1. Apps never control the hardware directly. They make requests to the operating system, which does the work on their behalf. The dashed gold lines move unless your device is set to reduce motion.
Key Idea: Protection

The processor can run in at least two modes. In kernel mode code may touch any hardware or memory. In user mode, where ordinary apps run, it may not. If a user-mode app needs something restricted, it must ask the kernel through a system call. This is why one crashing app usually cannot take the whole device down with it, and it is a basic security boundary.

2.Starting Up: From Power Button to Desktop

When you press the power button, the operating system is not yet in memory, so something else has to start the process. This chain of steps is called booting (from "pulling yourself up by your bootstraps"):

  1. The hardware powers up and special built-in software called firmware (often UEFI or BIOS on computers) checks that the main parts are working.
  2. The firmware finds the storage that holds the operating system and loads a small program called the bootloader.
  3. The bootloader loads the kernel into memory.
  4. The kernel starts up, sets up memory management, loads drivers and launches background services.
  5. The login screen or desktop appears, and you can start running apps.
The boot sequence Five numbered steps from top to bottom: power on and firmware self-check, load the bootloader, load the kernel, kernel starts drivers and services, and the login screen appears. What happens when you switch on 1 Power on: firmware checks the hardware built-in software tests memory and parts 2 Firmware loads the bootloader a small program found on the storage drive 3 Bootloader loads the kernel into memory the core of the operating system 4 Kernel starts drivers and services memory, devices, network, background tasks 5 Login screen or desktop appears now you can run apps
Figure 2. The boot sequence. Each step lights up in turn unless your device is set to reduce motion.

3.Processes and Scheduling: Sharing the Processor

A program is a set of instructions stored on disk. A process is a program that is running, together with its memory and current state. A thread is a smaller unit of work inside a process, and a process can have several. A modern device may have dozens or hundreds of processes, but only a handful of processor cores that can run instructions at the same moment.

The solution is multitasking. The operating system lets each process use the processor for a very short time slice, then switches to another, then another, and comes back around. Each switch is called a context switch: the OS saves the first process's state and loads the next one's. Because the slices are milliseconds long, everything seems to run at once. The part of the OS that decides who runs next is the scheduler.

At any moment a process is in one of three main states. It is running on a core, ready and waiting for a turn, or waiting for something slow, such as a disk read or a key press. A process that is waiting is not wasting the processor, because the scheduler gives the processor to another process meanwhile.

The three main states of a process A process starts in the ready state. The scheduler moves it to running. When its time slice ends it returns to ready. If it must wait for input or the disk it moves to waiting, and when the event finishes it returns to ready. When done it finishes. Life of a process starts finishes Ready Running Waiting scheduler picks it time slice ends needs disk or input event done
Figure 3. A process moves between ready, running and waiting many times. The scheduler controls the move from ready to running.
Worked Example 1: Round-robin scheduling

Three processes all arrive at time 0 and need processor time as follows: A needs 5 ms, B needs 3 ms, C needs 7 ms. The scheduler uses round-robin: each process runs for at most a time slice of 3 ms, then goes to the back of the queue.

Step 1: Build the timeline.

Step 2: Average finishing time. (11 + 6 + 15) ÷ 3 = 32 ÷ 3 ≈ 10.7 ms.

Step 3: Compare with "first come, first served" (run A fully, then B, then C): finishing times are 5, 8 and 15 ms, which averages (5 + 8 + 15) ÷ 3 = 9.3 ms.

Step 4: Compare how soon each first gets a turn. Round-robin: A at 0, B at 3, C at 6, an average of 3 ms. First come, first served: A at 0, B at 5, C at 8, an average of about 4.3 ms.

What this shows: round-robin finished jobs slightly later on average here, but everyone got a turn sooner, so the system feels more responsive. Real schedulers balance several goals, including fairness, speed and how important a task is.

4.Memory Management: Private Space for Every Process

Every process needs memory for its code and data. The OS gives each process its own virtual address space, a private set of addresses that looks like a long, empty stretch of memory belonging to that process alone. Behind the scenes, the OS and the processor translate these virtual addresses into real locations in physical memory (RAM). Memory is divided into equal blocks: pages in the virtual space and frames in physical memory. A page table records which page sits in which frame.

This gives three benefits:

Virtual pages mapped to physical frames Process A has three virtual pages. A0 maps to frame 2, A1 maps to frame 0, and A2 is stored on disk. Process B has two pages: B0 maps to frame 4 and B1 maps to frame 1. Frames 3 and 5 are free. Page table: who is where in RAM Process A RAM frames Process B A0A1A2 Frame 0: A1 Frame 1: B1 Frame 2: A0 Frame 3: free Frame 4: B0 Frame 5: free B0B1 Disk (swap) holds A2 for now
Figure 4. Each process thinks it has its own memory. The page table maps pages to frames, and a page not currently needed (A2) can wait on disk. The dashed lines move unless your device is set to reduce motion.
Worked Example 2: Finding a page and offset

Suppose pages are 4 KB each, which is 4,096 bytes. A program asks for the byte at virtual address 10,000.

Step 1: Which page? Divide by the page size: 10,000 ÷ 4,096 = 2 with a remainder. So the address is in page 2 (pages are numbered from 0).

Step 2: How far into the page? The remainder is the offset: 10,000 − (2 × 4,096) = 10,000 − 8,192 = 1,808.

Step 3: Translate. The OS looks up page 2 in the page table. If page 2 is in frame 7, the real location is frame 7 plus an offset of 1,808.

Another quick check: a program of 100 MB needs 100 × 1,024 ÷ 4 = 25,600 pages of 4 KB each.

Note: page sizes vary between systems and 4 KB is only a common choice. The idea is the same: split an address into a page number and an offset.

5.File Systems: Turning a Drive into Files and Folders

A storage drive is just a huge series of blocks. The file system organises them into files, folders (directories) and paths (such as Documents/School/essay.txt), and keeps records of where each file's data is stored. It also stores metadata: the name, size, dates and permissions of each file. Common file systems include NTFS on Windows, APFS on Apple devices and ext4 on many Linux systems.

Worked Example 3: Wasted space in small files

Suppose the allocation unit is 4 KB = 4,096 bytes.

A 10,000-byte file: 10,000 ÷ 4,096 = 2.44, so it needs 3 units (always round up). It occupies 3 × 4,096 = 12,288 bytes. The unused part is 12,288 − 10,000 = 2,288 bytes, often called slack space.

1,000 tiny files of 100 bytes each: each still takes a whole unit, so they occupy 1,000 × 4,096 = 4,096,000 bytes (about 4.1 MB), even though they hold only 1,000 × 100 = 100,000 bytes of real data. That is about 41 times more space than the data itself.

Lesson: many small files waste more space than a few large ones. Different file systems handle small files in different ways, so the exact waste varies.

6.Drivers, Input and Output, and Interrupts

Hardware devices work at very different speeds. A processor can do millions of operations in the time it takes to press a key. Instead of constantly checking whether a key has been pressed, the processor gets on with other work, and the device sends a signal called an interrupt when something happens. The processor pauses what it is doing, the OS runs a short piece of code to handle the event through the right driver, and then normal work resumes. This is why you can type while a download runs in the background.

7.Users, Permissions and Security

The operating system is also the first line of defence. It keeps separate user accounts, checks permissions before letting a program touch a file or device, and isolates processes from each other. Everyday use should be done from a standard account rather than an administrator account, so that malware running in your name has less power (this is the idea of least privilege in Cybersecurity Basics). Phone systems add sandboxing, which confines each app to its own area, and ask permission before an app can use the camera, location or contacts (see Digital Footprint & Online Privacy).

Updates matter because the OS is a huge program with inevitable flaws. Updates fix security holes, and installing them promptly is one of the best defences available.

8.User Interfaces

The OS also provides the way you control the device. A command-line interface (CLI) accepts typed commands through a program called a shell. It is precise, can be automated, and is still widely used by programmers and system administrators. A graphical user interface (GUI) uses windows, icons, menus and a pointer, an idea developed at Xerox PARC in the 1970s and popularised by the Macintosh and Windows. Phones and tablets are built around touch, and many devices now also accept voice. All of these sit on top of the same underlying kernel jobs.

9.Major Operating Systems and How They Are Related

Operating systems have a family tree. In the early 1970s at Bell Labs, Ken Thompson and Dennis Ritchie created Unix, whose ideas strongly influenced many later systems. In 1991 Linus Torvalds began writing a free kernel, now called Linux, in the Unix style.

SystemWhere you find itUseful facts
WindowsMany desktops and laptopsMade by Microsoft. First released in 1985. It runs on a kernel of its own design, not Unix-based.
macOSApple laptops and desktopsMade by Apple. Built on a Unix-based core, introduced in the early 2000s.
LinuxServers, supercomputers, many embedded devices, and desktopsStrictly the name of the kernel. It is combined with other software into "distributions". It is open source.
AndroidMost of the world's smartphones, plus tablets and TVsBased on the Linux kernel. Released in 2008. Open-source core, though phone makers add their own software.
iOS / iPadOSiPhone and iPadMade by Apple, related to macOS. Released in 2007.
Embedded and real-time systemsRouters, cars, medical devices, appliancesSmall operating systems designed to respond within a guaranteed time.

Open source means the source code is published and others may study, modify and share it under a licence. Proprietary software keeps its code private. Each approach has advantages: openness lets many people inspect and improve the code, while a single company can control the whole experience tightly. Both kinds power huge numbers of devices.

10.Running Several Operating Systems at Once

A hypervisor can divide one physical computer into several virtual machines, each running its own operating system (see Cloud Computing). This is how data centres share one server among many customers, and how a person can run Windows and Linux side by side on one laptop. Many servers in the cloud use Linux, although they also run other systems.

11.Using What You Know: Why Is My Device Slow?

Understanding the OS helps you diagnose everyday problems. Match the symptom to the idea behind it:

SymptomLikely ideaSensible action
Everything slows when many apps are openToo many processes competing for the processor and RAM; swapping to storageClose apps you are not using. Look at your device's activity monitor to see what uses the most.
A device is slow right after switching onMany background services and start-up apps launchingDisable start-up apps you do not need.
"Disk full" warningsThe file system has no free space; storage is crowdedRemove unused files and apps, and move big files elsewhere.
An app freezes but others workOne process is stuck; process isolation means others are unaffectedClose that app. Restart if it keeps happening.
Battery drains quicklyBackground processes and screen use keep the processor busyCheck battery settings to see which apps use most.
Strange behaviour after a long time onMemory problems or buggy softwareRestart. It clears memory and starts a fresh set of processes.

Keep the system and your apps updated, keep backups of important files (see Cloud Computing), and only force-close or delete things you recognise. Ending the wrong system process can make a device unstable.

12.Common Mistakes and Misconceptions

13.Check Your Understanding

Try each question first, then tap it to reveal the answer. A scored multiple-choice quiz follows below.

1. In one sentence, what does an operating system do?

It manages the hardware and gives apps a standard, safe way to use it, handling processes, memory, files and devices.

2. Why can apps not simply control the hardware themselves?

They would need code for every device, and two apps could clash. Letting the kernel control hardware also keeps one faulty app from crashing the whole device.

3. In Worked Example 1, why is round-robin useful even though its average finishing time was slightly worse?

Every process gets its first turn sooner (average 3 ms instead of about 4.3 ms), so the system feels more responsive.

4. With 4,096-byte pages, which page and offset is virtual address 5,000?

5,000 ÷ 4,096 = 1 remainder 904, so page 1, offset 904.

5. A 5,000-byte file is stored with 4 KB (4,096-byte) allocation units. How much disk space does it use?

5,000 ÷ 4,096 is about 1.22, so it needs 2 units: 2 × 4,096 = 8,192 bytes.

6. Why is a standard user account safer than an administrator account for daily use?

Malware running as a standard user has fewer permissions, so it can do less damage. This is the principle of least privilege.

14.Summary

For Teachers and Parents

Be the scheduler: give each student a card saying how many "time units" their job needs, and let one student act as the scheduler with a time slice of 3. Record the finishing times and compare with first come, first served, as in Worked Example 1.

Paper file system: use index cards as storage blocks and let students write file names and a list of block numbers on a "directory" sheet. Delete a file by crossing out only its directory entry and discuss what remains.

Explore your own device: with an adult nearby, open the device's built-in activity or battery screen (such as Task Manager, Activity Monitor or battery settings), look at which apps use the most, and discuss why. Do not end processes you do not recognise.

Safety note: installing or removing operating systems, and changing system settings, should be done on a spare or practice device, with a backup, and with a responsible adult.

15.Sources and Further Reading

This article is original EDUSAMBAM writing. Its structure follows the three themes of the free university textbook below (virtualisation of the processor and memory, concurrency and persistence), and the diagrams are original EDUSAMBAM schematics. The scheduling, paging and file-space calculations are simplified teaching models with invented numbers, and real systems use more advanced methods. Dates and names (Unix, Linux, Windows, Android, iOS) are from the public historical record.

Operating systems change with every release, so check your own device's current settings and documentation. This article does not recommend one operating system over another.

Test Your Understanding

Practice Quiz

10 questions. Select an answer for each, then submit to see your score instantly.

0 of 10 answered
0/10
You scored 0%
Keep practicing
1.What is the main job of an operating system?
2.Which part of the operating system has full access to the hardware?
3.Why does a printer need a device driver?
4.What does the scheduler do?
5.In Worked Example 1, when does process B finish (3 ms time slices)?
6.Why does each process get its own virtual address space?
7.With 4,096-byte pages, which page is virtual address 10,000 in?
8.A 10,000-byte file is stored with 4,096-byte allocation units. How much disk space does it use?
9.Which statement about Linux is correct?
10.What does a journaling file system help with?
← Previous: Computer Vision: How Machines Learn to SeeGateway