Computer ScienceBasicsbeginner

What Is an Operating System? Functions Explained

A plain-language guide to operating systems: what an OS is, its main functions, the kernel, types of OS and everyday examples.

Published
TL;DR – Quick Answer

An operating system (OS) is the main software that runs a computer or phone. It sits between the hardware and your apps, and it manages the CPU, memory, files and devices so that programs can run without dealing with the hardware directly. Its main functions are process management, memory management, file management, device management, security and providing a user interface. Windows, macOS, Linux, Android and iOS are common operating systems.

On This Page

An operating system, or OS, is the main software that runs a computer or a phone. It sits between the hardware (CPU, memory, disk, keyboard, screen) and the apps you use. Apps ask the OS for what they need, and the OS manages the hardware for them.

Without an OS, every app would need to know exactly how to talk to your particular disk, screen and Wi-Fi card. With an OS, an app simply says "save this file" or "show this window", and the OS does the rest.

This page gives a simple definition, explains each main function with everyday examples, lists the types of operating systems and ends with the terms you should know for exams and interviews.

Operating system in simple words: the college office analogy

Think of a college with many students, a few classrooms, one library and one printer.

  • Students want classrooms, books and printouts.
  • If everyone grabbed rooms and printers on their own, there would be fights and wasted time.
  • So the college office decides who gets which room and when, keeps the records, and makes sure only allowed people enter the labs.

The operating system is that office. Apps are the students. The CPU, memory, disk and printer are the shared resources.

Where the OS sits

+-----------------------------------------------+
|   You (the user)                              |
+-----------------------------------------------+
|   Applications: Chrome, VS Code, WhatsApp     |
+-----------------------------------------------+
|   Operating system                            |
|   (user interface, system programs, kernel)   |
+-----------------------------------------------+
|   Hardware: CPU, RAM, disk, keyboard, screen  |
+-----------------------------------------------+

Apps never touch the hardware directly. They make requests to the OS, called system calls. For example, when a program opens a file, it asks the OS to open it, and the OS reads the disk.

Main functions of an operating system

1. Process management

A running program is called a process. You may have Chrome, Spotify and VS Code open at once, but a CPU core can only run one process at a time.

The OS:

  • Creates and ends processes.
  • Decides which process runs next and for how long. This is called CPU scheduling.
  • Switches between processes so quickly (many times a second) that they all seem to run together.

Common scheduling methods include First Come First Served, Shortest Job First, Priority and Round Robin. Round Robin gives each process a small time slice in turn, like a queue where each person gets a short turn and then goes to the back.

A process can contain several threads, smaller units of work that share the same memory. Our process vs thread page explains the difference.

2. Memory management

RAM is shared by every running program. The OS:

  • Gives each process its own memory area.
  • Stops one process from reading or overwriting another's memory.
  • Takes memory back when a process ends.
  • Uses virtual memory: when RAM is full, it moves less-used data to the disk for a while. This lets you open more programs than RAM alone could hold, but it is slower, which is why a computer with too little RAM feels sluggish.

3. File management

Your disk is just a huge area of storage blocks. The OS organises it into files and folders using a file system such as NTFS (Windows), ext4 (Linux) or APFS (macOS).

The OS:

  • Creates, reads, writes, renames and deletes files.
  • Keeps track of which blocks belong to which file.
  • Controls who may read or change each file.

4. Device management

Keyboards, printers, webcams and USB drives all work differently. The OS uses small programs called device drivers to talk to each device. Apps just say "print this", and the OS and the printer driver handle the details.

The OS also queues requests. If three people send documents to the same printer, the OS puts them in a print queue.

5. Security and access control

The OS protects the system and your data:

  • User accounts and passwords.
  • File permissions (who can read, write or run a file).
  • Keeping each process inside its own memory.
  • Asking for permission before an app uses the camera or location on your phone.

6. User interface

The OS gives you a way to use the computer:

  • A GUI (graphical user interface): windows, icons, menus, taps and clicks.
  • A CLI (command-line interface): typing commands into a terminal.

For example, these commands list files in the current folder:

Windows (Command Prompt):   dir
Linux or macOS (Terminal):  ls -l

Developers use the command line a lot, especially on Linux servers. Our Linux commands guide is a good next step.

Other jobs the OS does

  • Booting: loading itself when you switch the device on.
  • Error handling: detecting problems such as a program crashing, and keeping the rest of the system running.
  • Networking: sending and receiving data through Wi-Fi or Ethernet. See computer networks basics.
  • Resource accounting: tracking CPU and memory use, which you can see in Task Manager on Windows or with the top command on Linux.

The kernel: the core of the OS

The kernel is the heart of the operating system. It loads first, stays in memory the whole time and talks directly to the hardware. It handles scheduling, memory, devices and system calls.

Around the kernel sit system programs and the user interface. When people say "Linux", they often mean a full OS such as Ubuntu, but strictly speaking Linux is the kernel. Android also runs on the Linux kernel.

Kernel type Idea Example
Monolithic kernel Most OS services run inside the kernel Linux
Microkernel Only the basics run in the kernel; other services run as separate programs MINIX, QNX
Hybrid kernel A mix of both Windows NT kernel, macOS (XNU)

Examples of operating systems

Operating system Where you find it Made by
Windows Most laptops and desktops in offices and colleges Microsoft
macOS Apple MacBooks and iMacs Apple
Linux (Ubuntu, Fedora, Debian and others) Most web servers, cloud machines, developer laptops Open source community and companies
Android Most smartphones in India Google, built on the Linux kernel
iOS iPhones Apple
ChromeOS Chromebooks Google

For developers, Linux matters a lot: most servers that run websites and apps use it, including the virtual servers you rent through cloud computing. The Linux vs Windows for programming page compares the two for students.

Types of operating systems

These types are often asked in university exams and fresher interviews.

Type How it works Example
Batch OS Similar jobs are grouped and run one after another without user interaction Early mainframes, payroll processing
Time-sharing (multitasking) OS The CPU switches between many tasks quickly so each user or app gets a share Windows, Linux, macOS
Multiprocessing OS Uses two or more CPUs or cores at the same time Every modern desktop OS
Distributed OS Many computers work together and appear as one system Research and cluster systems
Network OS Manages shared files, printers and users across a network Windows Server, Linux servers
Real-time OS (RTOS) Must respond within a fixed time limit Airbag controllers, medical devices, FreeRTOS
Mobile OS Built for touch screens, batteries and mobile networks Android, iOS

Key terms to remember

Term Meaning
Process A program that is running
Thread A smaller unit of work inside a process
Scheduling Deciding which process gets the CPU next
Context switch Saving one process's state and loading another's
Virtual memory Using disk space as an extension of RAM
Deadlock Two or more processes each waiting for a resource the other holds, so none can continue
System call A request from a program to the OS, such as opening a file
Device driver Software that lets the OS talk to a specific device

Interview note: "What happens when you switch on a computer?" is a common question. A short answer: the firmware (BIOS or UEFI) checks the hardware, finds the boot loader on the disk, the boot loader loads the kernel into memory, and the kernel starts the rest of the OS and the login screen.

Quick revision

  • An OS is the software that manages hardware and runs apps.
  • Its main functions are process, memory, file and device management, security and the user interface.
  • The kernel is the core that talks to the hardware.
  • Common examples: Windows, macOS, Linux, Android, iOS.
  • Types include batch, time-sharing, distributed, network, real-time and mobile.

When you are ready to test yourself, try our operating system interview questions. For the next computer science basic, read computer networks basics.

Frequently Asked Questions

What is an operating system in simple words?
It is the software that makes a computer usable. It starts when you switch the device on, runs your apps, and shares the CPU, memory, storage and devices between them.
What are the main functions of an operating system?
Process management, memory management, file management, device management, security and access control, and providing a user interface such as a desktop or a command line.
What are some examples of operating systems?
Windows, macOS and Linux on laptops and desktops; Android and iOS on phones; Linux distributions such as Ubuntu on most servers.
What is a kernel?
The kernel is the core part of the operating system. It stays in memory, talks directly to the hardware and handles jobs such as scheduling processes and managing memory. Linux is, strictly speaking, a kernel.
What are the types of operating systems?
Common types taught in B.Tech courses are batch, time-sharing (multitasking), distributed, network, real-time and mobile operating systems.
Is Android an operating system?
Yes. Android is a mobile operating system built on the Linux kernel.

Want to Build Your Career in Java Full Stack with AI?

Join CodeBegun and train with working industry engineers — Explore the Java Full Stack program

Apply for Demo Class →
Siva Prasad Galaba
Founder, CodeBegun · Staff Engineer

Founder of CodeBegun. 15+ years building Java systems at companies like Crunchyroll. Teaches Java, Spring Boot and system design the way the industry actually works, and mentors students through projects, mock interviews and placement preparation.

Technically reviewed by CodeBegun Technical TeamLast reviewed 5 December 2026 LinkedIn
Chat with us