Skip to content
Documentation Background

Operating Systems

An operating system (OS) is the software layer that manages computer hardware and provides services to applications. It’s the intermediary between you (or your software) and the hardware.

An OS has two main parts:

  • Kernel - the core: manages hardware, processes, memory, and I/O
  • Userspace - the environment where applications and user interactions happen

The kernel is the heart of the OS. It runs with full hardware access and handles:

ResponsibilityDescription
Process managementCreates, schedules, and terminates processes
Memory managementAllocates RAM to processes, manages virtual memory
I/O managementCoordinates all input/output between software and devices
File systemManages how data is stored and retrieved from storage
  • Kernel mode: Direct hardware access - only the kernel runs here
  • User mode: Restricted access - all applications run here and make system calls to request kernel services

A program is an application stored on disk (e.g., Chrome).
A process is a running instance of that program - it has allocated memory and CPU time.

  • You can have multiple processes from the same program (e.g., many browser tabs)
  • The kernel uses time slices to rapidly switch the CPU between processes - creating the illusion of parallelism on a single core
NEW → READY → RUNNING → (WAITING / TERMINATED)

The kernel’s scheduler decides which process runs next based on priority and fairness algorithms.


Processes need RAM to run. When physical RAM fills up, the OS uses virtual memory - a combination of RAM and disk space:

  1. Least-recently-used memory pages are written to a swap partition/file on disk
  2. When needed again, they’re loaded back into RAM

This allows the OS to run more processes than physical RAM alone could support - at the cost of speed (disk is much slower than RAM).

Files are stored on disk in data blocks - fixed-size chunks. This allows:

  • Faster random access (no need to read a file sequentially from start to end)
  • Efficient space reuse when files are deleted

The file system defines how data is organized on storage.

OSDefault File System
WindowsNTFS
macOSAPFS
Linuxext4 (most common)

Key concepts:

  • File extension: Indicates file type (.exe, .pdf, .txt) - used by the OS to determine how to open it
  • Metadata: Information about the file - name, size, timestamps, permissions
  • File managers: Finder (macOS), File Explorer (Windows), Nautilus (Ubuntu)

I/O (Input/Output) covers everything that communicates with the CPU:

  • Input devices: Keyboard, mouse, microphone, webcam
  • Output devices: Monitor, speakers, printer
  • Both: Hard drives, USB drives, SSDs, network cards

The kernel uses device drivers - software that knows how to talk to specific hardware - to abstract hardware differences from applications.


A shell is a program that takes text commands and sends them to the OS to execute. Two major types:

Text-based. Powerful, scriptable, efficient for automation.

  • Linux: bash, zsh, fish
  • Windows: cmd.exe, PowerShell

Visual windows, icons, and menus. More approachable for general users.

  • Windows Explorer, macOS Finder, GNOME

Logs are files that record system events - like a diary for the OS.

OSLog location
Linux/macOS/var/log/
WindowsEvent Viewer (eventvwr)

Common logs:

  • System log: hardware, driver events
  • Application log: app crashes and errors
  • Security log: login attempts, access events

Logs are your best friend when troubleshooting - always check them before guessing.


OSPrimary Use
WindowsEnterprise desktops, consumer PCs
macOSApple hardware, creative/dev professionals
LinuxServers, cloud, developers, embedded systems
Chrome OSChromebooks - cloud-centric, lightweight, secure
Android / iOSMobile - based on Linux and Darwin respectively

A virtual machine (VM) is a software emulation of a physical computer. It runs a complete OS inside another OS.

Use cases:

  • Testing software in isolation
  • Running multiple OS environments on one machine
  • Creating identical, reproducible system images for deployment