The Runtime Theory
Operating Systems

What Is an Operating System?

An operating system is the resource manager and abstraction layer between hardware and applications, providing processes, memory, files, and devices.

The Runtime Theory Team7 min read#os#kernel#processes#memory#beginners
▸ On this page

What Is an Operating System?

An operating system (OS) is software that sits between computer hardware and application programs. It manages hardware resources and provides abstractions that make it easier to write and run applications.

The Four Roles of an OS

1. Resource Manager

The OS decides who gets what, when. It manages:

  • CPU — which process runs on which core and for how long
  • Memory — which process uses which memory addresses
  • Disk — which process reads and writes which files
  • Devices — which process accesses the network card, keyboard, display

2. Abstraction Layer

The OS hides hardware complexity behind simple interfaces. Instead of dealing with raw disk sectors, your program calls open("file.txt") and read(fd, buf, size). Instead of managing physical memory addresses, your program allocates memory with malloc().

3. Extended Machine

The OS makes the hardware more convenient to program. It provides virtual memory (each process thinks it owns all of RAM), virtual cores (time-sharing one physical core across many processes), and virtual files (a uniform interface to disks, pipes, network sockets, and devices).

4. File System

The OS organizes data on disk into files and directories, enforcing permissions and providing durability.

Kernel vs. User Mode

Modern CPUs have multiple protection rings (privilege levels). The OS kernel runs in the most privileged mode (ring 0), where it can execute any instruction and access any memory. Applications run in user mode (ring 3), where dangerous instructions are blocked.

When an application needs something the kernel controls — reading a file, sending network data, allocating memory — it must make a system call, which switches to kernel mode, performs the operation, and returns.

Examples

OSType
WindowsGeneral-purpose (desktop/server)
macOSGeneral-purpose (Unix-based)
LinuxGeneral-purpose (Unix-like)
AndroidMobile (Linux kernel + runtime)
iOSMobile (XNU kernel, sandboxed)

Key Concepts to Build On

From this foundation, you will learn how the OS creates and manages processes — the executing units of computation — and how it switches between them thousands of times per second.

Read: What Is a Process? · Trace: Process Lifecycle


This article begins the Operating Systems From the Ground Up learning path.

Not started

Sign in to save your learning progress.

Sign in to save