Skills101

Operating Systems · Lesson 1 of 9 · Updated ·

Introduction to Operating Systems — Kernel, System Calls and Types of OS

An operating system (OS) is the software layer between your programs and the hardware. Windows, Linux, macOS, Android and iOS are operating systems.

Layers: users at the top, then applications like Chrome and VS Code, then the operating system kernel managing processes, memory, files and devices, then hardware at the bottom

1. What does an OS do?

JobExample
Process managementruns many programs, decides who gets the CPU
Memory managementgives each program its own memory, swaps to disk when RAM is full
File managementfiles and folders, permissions
Device managementdrivers for keyboard, Wi-Fi, printer
Security & protectionusers, passwords, one program can't read another's memory
User interfacethe shell, the desktop

Two big ideas: the OS is a resource manager (CPU, memory, disk are shared fairly) and an extended machine (programs say "save this file", not "move disk head to track 734").

2. The kernel

The kernel is the core of the OS — always in memory, with full control of the hardware.

DesignIdeaExample
Monolithiceverything (drivers, file system, scheduler) in one big kernel; fastLinux
Microkernelonly the bare minimum in the kernel; the rest runs as separate services; more stableMinix, QNX
Hybrida mixWindows, macOS

3. User mode vs kernel mode

Your program runs in restricted user mode; when it needs the disk or screen it makes a system call that switches to kernel mode, where the OS handler does the work

The CPU has (at least) two modes:

  • User mode — normal programs; can't touch hardware directly.
  • Kernel mode — the OS; full access.

This protects the system: a buggy app can crash itself, but not the whole machine.

4. System calls

A system call is how a program asks the OS to do something privileged. When Python runs print("hi"), it eventually calls write(), which switches to kernel mode, writes to the screen and returns.

CategoryExamples (Linux)
Process controlfork(), exec(), exit(), wait()
File managementopen(), read(), write(), close()
Device managementioctl()
Informationgetpid(), time()
Communicationpipe(), socket()

5. Types of operating systems

TypeIdeaExample use
Batchjobs collected and run one after another, no interactionold mainframes, payroll runs
Multiprogrammingseveral programs in memory; when one waits for I/O, another uses the CPUthe basis of modern OS
Time-sharing / multitaskingCPU switches between programs every few milliseconds so all feel liveWindows, Linux desktops
Real-time (RTOS)must respond within strict time limitsairbags, pacemakers, robots
Distributedmany computers act as onecloud systems
Mobilebattery and touch focusedAndroid, iOS

6. Booting in one line

Power on → firmware (BIOS/UEFI) checks hardware → bootloader (e.g. GRUB) loads the kernel → kernel starts the first process (init/systemd) → login screen.

Common mistakes

  • Saying the OS and the kernel are the same — the kernel is the core part of the OS.
  • Thinking apps talk to hardware directly. They go through system calls.
  • Confusing multiprogramming (CPU kept busy) with multiprocessing (multiple CPUs).

Quick recap

  • The OS manages processes, memory, files, devices and security.
  • Kernel types: monolithic, microkernel, hybrid.
  • User mode vs kernel mode; system calls cross between them.
  • Types: batch, multiprogramming, time-sharing, real-time, distributed, mobile.

Practice what you learned

📝 Quiz: OS Introduction5 questions · instant answers & explanations · +10 XP · counts towards your free certificateTake the quiz →