What is an operating system?

In my words, an OS is the middle man between an application software and the hardware and manages everything.

If application softwares were to talk directly to hardware, there will be a lot of chaos in the system - corrupt memory, programs will crash each other,

It does four core jobs:

  • Process management — runs your programs, decides which gets CPU time
  • Memory management — gives each program its own chunk of RAM, keeps them isolated
  • File system — organizes data on disk into files and folders
  • I/O management — handles input/output: keyboard, screen, network, disk

The brain of the OS that does all this is called the kernel.

The Kernel

The kernel runs with full access to hardware. Everything else — your browser, terminal, Python script — runs in user-space, which is restricted.

When your program needs hardware (read a file, open a socket, print something), it can’t do it directly. It asks the kernel via a system call (syscall). The kernel does it, then returns the result.

Your Program (userspace)
       ↓  syscall
    Kernel
       ↓
    Hardware

That boundary — userspace vs kernel space — is one of the most important concepts in OS design.

The kernel is not the OS — it’s the core of it.

Kernel = just the part that manages hardware, processes, memory, syscalls. Bare, minimal, no UI, no tools.

OS = kernel + everything built on top: shell, file utilities, package manager, system libraries, init system, etc.

That’s why Linux is technically just a kernel. What most people call “Linux” (Ubuntu, Arch, Debian) is more accurately called a GNU/Linux distribution — it’s the Linux kernel + GNU tools + everything else bundled together.

Android is also Linux under the hood — same kernel, completely different everything-else on top.

So: kernel ⊂ OS.

The kernel of an operating system is something you will never see. It basically enables any other programs to execute. It handles events generated by hardware (called interrupts) and software (called system calls), and manages access to resources.

The hardware event handlers (interrupt handlers) will for instance get the number of the key you just pressed, and convert it to the corresponding character stored in a buffer so some program can retrieve it.

The system calls are initiated by user-level programs, for opening files, starting other programs, etc. Each system call handler will have to check whether the arguments passed are valid, then perform the internal operation to complete the request.

Most user programs do not directly issue system calls (except for asm programs, for instance), but instead use a standard library which does the ugly job of formatting arguments as required by the kernel and generating the system call. (For example, the C function fopen() eventually calls a kernel function that actually opens the file.)

The kernel usually defines a few abstractions like files, processes, sockets, directories, etc. which correspond to an internal state it remembers about last operations, so that a program may issue a session of operation more efficiently.

The Boot Process

When you press the power button, your computer is essentially dead — no OS, no kernel, nothing loaded in RAM. Here’s what happens step by step:


1. BIOS / UEFI

The CPU wakes up and runs a tiny program baked into a chip on the motherboard — the BIOS (older) or UEFI (modern).

Its only job: run a quick hardware check (POST), then find a bootable device (your SSD/HDD).


2. Bootloader

The BIOS/UEFI hands control to a bootloader sitting at the start of your disk. On Linux, this is usually GRUB.

GRUB’s job: find the kernel on disk, load it into RAM, and hand control to it.

That menu you sometimes see on dual-boot machines asking “Ubuntu or Windows”? That’s GRUB.


3. Kernel loads

The kernel is now in RAM and running. It:

  • Detects hardware
  • Mounts the root filesystem
  • Starts PID 1

4. Init system (PID 1)

The kernel starts exactly one process — PID 1. On modern Linux this is systemd.

From here, systemd starts everything else — network, display, services, your login screen. Every process on the system is a descendant of PID 1.


Power → BIOS/UEFI → Bootloader (GRUB) → Kernel → PID 1 (systemd) → Everything else

PID stands for: Process ID.

Every process running on the system gets a unique number. PID 1 is special — it’s always the init system (systemd), always the first process, and it’s the ancestor of every other process on the machine.

You can see this yourself on any Linux system:

ps -e | head -20

PID 1 will always be there at the top.


Ready to move into Linux itself now? We’ll open the terminal and start navigating the filesystem — understanding where everything lives and why.

↑ Back to Operating Systems