What Is an Operating System?

An operating system (OS) is the software layer between a computer's hardware and every application, managing the CPU, memory, storage and input/output devices. It provides a consistent, safe interface so programs never have to talk to hardware directly, and it handles core jobs such as process management and memory management.

3 min read

An operating system, usually just called an OS, is the software that sits between raw hardware and every application you run. It manages the CPU, memory, storage, and input/output devices, and it exposes a consistent, safe interface so applications like a browser or a code editor never have to know the exact model of disk controller or graphics chip they're running on.

What an OS actually does

Strip away the marketing language and an OS does four core jobs:

  1. Process management. It decides which program gets to run on the CPU, when, and for how long, and it keeps programs isolated from each other so one crashing app doesn't take down the whole machine.
  2. Memory management. It hands out chunks of RAM to programs, keeps them from stepping on each other's memory, and creates the illusion that each program has its own private, large address space (this illusion is called virtual memory).
  3. File and storage management. It organizes raw bytes on a disk into files and folders, and controls who can read or write them.
  4. Device management. It talks to the actual hardware, keyboards, network cards, displays, through drivers, so applications call a generic "read file" or "send network packet" function instead of writing hardware-specific code.

Why this layer needs to exist at all

Without an OS, every application would need its own code to talk directly to disk controllers, network cards, and memory chips, and two applications running at the same time could easily overwrite each other's data or fight over the same hardware resource with no referee. The OS solves this by acting as a resource manager and a security boundary at the same time: it multiplexes limited hardware (one CPU, finite RAM) across many programs, and it enforces rules so a bug or malicious code in one program can't reach into another program's memory.

A concrete example

Open two programs at once, say a web browser and a text editor. Both want to use the CPU, and both think they have exclusive access to memory. The OS is quietly doing all of this behind the scenes: giving the browser a slice of CPU time, then switching to the text editor for its slice, giving each program its own private-looking memory space even though they're both really sharing the same physical RAM chips, and making sure a crash in the browser's rendering engine never corrupts the text editor's unsaved document.

Where this matters in real systems

Every general-purpose computer you use, a laptop running Windows or macOS, an Android phone, a cloud server running Linux, has exactly this kind of OS underneath it. Even highly specialized systems (the software in a car's engine control unit, a industrial robot arm) usually run a smaller real-time operating system built around the same core ideas, just tuned for strict timing guarantees instead of general-purpose flexibility.

What interviewers actually ask about operating systems

  • "What is an operating system, in one sentence?" Software that manages hardware resources and provides a consistent interface for applications to run on top of.
  • "Name the core responsibilities of an OS." Process management, memory management, file/storage management, and device management are the four expected answers.
  • "Why can't applications just talk to hardware directly?" Because there'd be no isolation between programs and no shared, safe way to arbitrate access to limited resources like the CPU and RAM.
  • "What's the difference between an OS and a kernel?" The kernel is the core part of the OS that runs with full hardware privileges; "operating system" often refers to the kernel plus the surrounding utilities, libraries, and user-facing tools shipped with it.

Key takeaways

  • An OS manages hardware (CPU, memory, storage, devices) and gives applications a consistent, safe interface to use it.
  • Its four core jobs are process management, memory management, file/storage management, and device management.
  • Without an OS, applications would need hardware-specific code and there'd be no isolation between programs.
  • The kernel is the OS's privileged core; "operating system" usually includes the kernel plus supporting tools built around it.
All 205 OS interview questions

Browse all Operating Systems topics

Log in to save which topics you've read across every subject.

Frequently asked questions

What is an operating system, in one sentence?

Software that manages hardware resources and provides a consistent interface for applications to run on top of.

Name the core responsibilities of an OS.

Process management, memory management, file/storage management, and device management are the four expected answers.

Why can't applications just talk to hardware directly?

Because there'd be no isolation between programs and no shared, safe way to arbitrate access to limited resources like the CPU and RAM.

What's the difference between an OS and a kernel?

The kernel is the core part of the OS that runs with full hardware privileges; "operating system" often refers to the kernel plus the surrounding utilities, libraries, and user-facing tools shipped with it.