Operating Systems Study Guide

Operating Systems: Complete Study Guide, Types, Functions & Examples

Operating Systems: Complete Study Guide, Types, Functions & Examples

Explore how operating systems manage computers and mobile devices, from early command-line systems to modern graphical platforms such as Windows, Linux, macOS, Android, and others. Learn about kernels, memory, processes, files, security, us...

16 min read · 3,011 words · Pramesh Koirala

Introduction

An operating system (OS) is the main system software that manages a computer's hardware and software resources. It acts as an intermediary between applications, users, and hardware such as the processor, memory, storage drives, keyboard, display, and network devices.

NIST describes an operating system as software that manages computer hardware resources and provides common services for computer programs.

Operating systems are found almost everywhere: desktop computers, smartphones, servers, cloud systems, automobiles, industrial machines, routers, smart televisions, and embedded devices. Examples include Microsoft Windows, macOS, Linux, Android, and iOS.

Understanding operating systems helps learners understand how computers run programs, manage memory, store files, communicate with hardware, protect data, and allow multiple applications to operate at the same time.

Learning Objectives

After studying this guide, you should be able to:

  • Define an operating system and explain its major functions.

  • Describe kernels, processes, threads, memory management, and file systems.

  • Explain CPU scheduling and multitasking.

  • Compare common types of operating systems.

  • Understand device management, system calls, and user interfaces.

  • Explain basic operating-system security and virtualization concepts.

What is an Operating System?

An operating system is the software layer between computer hardware and applications.

A simplified computer system can be represented as:

Users

   ↓

Applications

   ↓

Operating System

   ↓

Computer Hardware

Applications generally do not directly control every hardware device. Instead, they request services from the operating system.

For example, when a word processor saves a document, the application asks the operating system to create or update a file. The operating system works with the storage hardware and its device driver to complete the operation.

OpenStax describes the OS as the core software that manages and controls interactions between hardware and software.

Major Functions of an Operating System

An operating system performs many tasks simultaneously.

Function

Purpose

Process management

Controls running programs and CPU access

Memory management

Allocates and protects RAM

File management

Organizes files and directories

Device management

Controls hardware through drivers

CPU scheduling

Decides which task uses the processor

Security

Controls users, permissions, and access

User interface

Provides ways for users to interact with the computer

Networking

Supports communication between computers

Resource management

Shares hardware efficiently among programs

These responsibilities allow applications to run without needing to manage the physical hardware themselves.

The Kernel

The kernel is the central component of an operating system.

It operates close to the hardware and manages critical resources such as:

  • CPU time

  • Memory

  • Devices

  • Processes

  • Interrupts

  • System calls

NIST's operating-system definition identifies the kernel as the principal OS component that remains available in memory while the system operates.

A simplified structure looks like this:

Applications

     ↓

System Calls

     ↓

   Kernel

     ↓

 Hardware

Kernel Mode and User Mode

Modern operating systems normally separate execution into different privilege levels.

User mode is where ordinary applications generally execute. Programs operating here have restricted access to critical hardware and memory.

Kernel mode has much greater privileges. The operating-system kernel can directly manage hardware, memory, and other protected resources.

This separation helps prevent an ordinary application from accidentally or deliberately damaging the entire system.

Types of Kernel Architecture

Operating systems can organize kernel components in different ways.

Architecture

Basic Idea

Monolithic kernel

Most core OS services execute within the kernel

Microkernel

Keeps the kernel small and moves more services outside it

Hybrid kernel

Combines ideas from monolithic and microkernel designs

Monolithic Kernel

A monolithic design places major services such as process management, memory management, file-system support, and device management inside the kernel environment.

Linux is commonly classified as a monolithic kernel with modular capabilities, because kernel functionality can also be extended through loadable modules.

Microkernel

A microkernel attempts to keep only essential functions in the most privileged kernel space.

Other services can run separately. This approach can improve isolation, although communication between components may introduce additional overhead.

Hybrid Kernel

Hybrid designs combine features from different kernel architectures.

The important exam point is that kernel architecture describes how core operating-system services are organized, not what graphical interface the OS uses.

Processes

A program is a collection of instructions stored on a device.

A process is a program that is currently being executed.

When you start a browser, music player, or calculator, the operating system creates one or more processes to run that software.

Microsoft describes a process as a collection containing virtual memory space, code, data, and system resources.

A process may have several states:

New

 ↓

Ready

 ↓

Running

 ↓

Waiting

 ↓

Ready

 ↓

Terminated

Common Process States

New: The process is being created.

Ready: It is prepared to run but waiting for CPU time.

Running: The CPU is currently executing it.

Waiting or blocked: It is waiting for an event, such as disk input.

Terminated: Execution has finished.

Processes vs Threads

A thread is a unit of execution within a process.

One process can contain several threads. Microsoft notes that a process has at least one thread and may contain multiple additional threads.

Process

Thread

Represents a running program environment

Represents a path of execution

Has its own resources and address space

Shares many resources with other threads in its process

Usually heavier to create

Usually lighter than creating another complete process

Processes are isolated from each other

Threads within a process can share data

For example, a web browser could use different threads to manage user input, network communication, and page rendering.

Multitasking

Multitasking allows a computer to work on multiple tasks during the same period.

A CPU core generally executes a limited number of instruction streams at a particular instant, but the operating system can switch rapidly among tasks.

This switching can make applications appear to run simultaneously.

On systems with multiple CPU cores, several threads may actually execute at the same time on different cores.

CPU Scheduling

When several processes or threads are ready to run, the operating system must decide which one should receive CPU time.

This decision is called CPU scheduling.

The Linux kernel documentation, for example, contains multiple scheduling mechanisms for ordinary, real-time, deadline, and other workloads.

Common Scheduling Algorithms

Algorithm

Main Idea

First Come, First Served (FCFS)

Tasks run in arrival order

Shortest Job First (SJF)

Shortest predicted task runs first

Round Robin

Each task receives a time slice

Priority Scheduling

Higher-priority tasks are favored

Earliest Deadline First (EDF)

Tasks with earlier deadlines receive priority

Round Robin Example

Suppose three processes are waiting:

P1 → P2 → P3 → P1 → P2 → P3

Each receives a limited amount of CPU time called a time quantum or time slice.

If a process has not finished when its time expires, the operating system can move to another process.

Context Switching

A context switch occurs when the CPU changes from executing one task to another.

The operating system may need to save information about the current task, such as:

  • CPU registers

  • Program position

  • Scheduling information

It then restores the saved state of another task.

Context switching enables multitasking, but it also creates overhead because the CPU spends some time managing the switch instead of performing application work.

Memory Management

Computer programs need memory while they are running.

The operating system decides:

  • Which process receives memory

  • How much memory it receives

  • Which areas are protected

  • When memory can be reclaimed

Linux's kernel documentation identifies virtual memory, demand paging, allocation, file mapping, page reclaim, and swap as parts of its memory-management subsystem.

RAM and Virtual Memory

RAM, or random-access memory, provides fast temporary storage for actively used programs and data.

However, computers have limited physical RAM.

Virtual memory allows the operating system to provide processes with virtual address spaces that are mapped to physical memory and, when necessary, other storage mechanisms.

Microsoft explains that virtual addresses do not directly represent physical memory locations. The operating system and hardware translate virtual addresses to corresponding physical addresses through memory-management structures such as page tables.

Paging

Memory is commonly divided into fixed-size units called pages.

Virtual-memory pages can be mapped to frames in physical RAM.

Simplified example:

Virtual Page 1 → RAM

Virtual Page 2 → RAM

Virtual Page 3 → Not currently in RAM

Virtual Page 4 → RAM

When information that is not currently resident in RAM is required, the operating system may need to retrieve it.

This mechanism allows programs to work with virtual address spaces while the OS controls the underlying physical memory.

File Systems

A file system defines how information is stored, organized, named, and retrieved from storage devices.

The operating system uses file systems to manage items such as:

  • Files

  • Folders or directories

  • File names

  • Permissions

  • Metadata

  • Storage locations

Common file-system examples include:

File System

Common Association

NTFS

Windows

ext4

Linux

APFS

Apple platforms

FAT32

Broad device compatibility

exFAT

Removable and cross-platform storage

A file system makes it possible for users to work with meaningful names such as:

Documents/report.pdf

instead of manually identifying physical storage sectors.

Device Management

Computers contain many hardware devices, including:

  • Keyboards

  • Mice

  • Displays

  • Printers

  • Storage drives

  • Cameras

  • Network adapters

  • Audio hardware

Operating systems use device drivers to communicate with hardware.

A device driver is software that understands how to control a particular device or category of devices.

The relationship can be simplified as:

Application

    ↓

Operating System

    ↓

Device Driver

    ↓

Hardware

Drivers allow the operating system to provide applications with standardized ways of using different hardware.

Input and Output

Input/output (I/O) refers to communication between the computer and devices or external systems.

Examples include:

  • Reading from a keyboard

  • Writing data to a storage drive

  • Displaying graphics

  • Sending network packets

  • Playing sound

Because I/O devices often operate much more slowly than processors, operating systems use techniques such as buffering, caching, interrupts, and queues to manage them efficiently.

Interrupts

An interrupt is a signal indicating that some event requires CPU attention.

For example, hardware may generate an interrupt when:

  • A key is pressed

  • Network data arrives

  • A storage operation finishes

  • A timer expires

The CPU temporarily transfers control to an appropriate interrupt-handling routine.

After the event is handled, normal processing can continue.

System Calls

Applications require a controlled way to request operating-system services.

A system call provides that interface.

Programs can use system calls for tasks such as:

  • Opening files

  • Reading data

  • Writing data

  • Creating processes

  • Allocating memory

  • Communicating over networks

Instead of letting an ordinary application directly manipulate protected hardware, the application requests an authorized service from the kernel.

User Interfaces

Operating systems provide ways for people to interact with computers.

Graphical User Interface

A graphical user interface (GUI) uses visual elements such as:

  • Windows

  • Icons

  • Menus

  • Buttons

  • Pointers

Desktop and mobile operating systems commonly provide graphical interfaces.

Command-Line Interface

A command-line interface (CLI) allows users to type textual commands.

For example:

mkdir projects

could request the creation of a directory on systems supporting that command.

Command-line interfaces are especially useful for system administration, development, scripting, and automation.

Types of Operating Systems

Operating systems can also be classified according to the workloads and devices they support.

Batch Operating Systems

Batch systems process collections of jobs with limited interactive input.

They were particularly significant in early large-scale computing environments.

Time-Sharing Operating Systems

A time-sharing system divides processor time among multiple users or tasks.

Rapid switching allows many activities to make progress.

Multiuser Operating Systems

A multiuser OS allows multiple users to access the same computer system while keeping their accounts and resources appropriately separated.

Server operating systems commonly support this capability.

Multiprocessing Operating Systems

Multiprocessing systems use more than one processor or CPU core.

The operating system coordinates tasks across available processing resources.

Real-Time Operating Systems

A real-time operating system (RTOS) is designed for workloads in which predictable response times are important.

Real-time systems are common in:

  • Industrial controllers

  • Robotics

  • Automotive systems

  • Medical equipment

  • Embedded systems

In real-time computing, meeting timing requirements can be more important than maximizing average performance.

Embedded Operating Systems

Embedded operating systems are designed for specialized devices rather than general-purpose desktop computers.

Examples of embedded devices include:

  • Routers

  • Smart appliances

  • Industrial sensors

  • Vehicle-control systems

Mobile Operating Systems

Mobile operating systems are optimized for smartphones and tablets.

They must manage features such as:

  • Touch input

  • Mobile networking

  • Cameras

  • Sensors

  • Battery consumption

  • Application permissions

Android and iOS are major examples.

Deadlocks

A deadlock occurs when processes become permanently stuck waiting for resources held by one another.

Consider:

Process A holds Resource 1

and waits for Resource 2.

Process B holds Resource 2

and waits for Resource 1.

Neither can continue.

Four conditions are traditionally associated with deadlock:

  1. Mutual exclusion

  2. Hold and wait

  3. No preemption

  4. Circular wait

Operating systems and applications can use prevention, avoidance, detection, or recovery strategies to deal with deadlocks.

Operating-System Security

Because the operating system controls critical resources, it is an important part of computer security.

Security mechanisms include:

  • User accounts

  • Authentication

  • File permissions

  • Process isolation

  • Memory protection

  • Encryption support

  • Security updates

  • Logging

  • Access controls

Principle of Least Privilege

The principle of least privilege says that users and processes should receive only the permissions required to perform their tasks.

NIST defines least privilege as restricting users or processes to the minimum privileges necessary to complete assigned functions.

For example, an ordinary application should not automatically receive full administrator privileges.

Limiting privileges reduces the damage that can occur if software is compromised.

Boot Process

Booting is the process of starting a computer and loading its operating environment.

A simplified boot sequence is:

Power On

   ↓

Firmware starts

   ↓

Hardware initialization

   ↓

Boot loader

   ↓

Operating-system kernel

   ↓

System services

   ↓

Login or user interface

Firmware

Modern computers commonly use firmware such as UEFI to initialize hardware and locate software needed to start the operating system.

Boot Loader

The boot loader locates and loads the operating-system kernel.

Kernel Initialization

The kernel initializes essential services such as memory management, scheduling, and device support.

The operating system then starts additional services and presents an interface to the user.

Operating Systems and Virtualization

Virtualization allows several operating-system environments to share one physical computer.

A hypervisor controls virtual machines and distributes physical resources among them.

Physical Hardware

       ↓

    Hypervisor

   ↙    ↓    ↘

 VM 1  VM 2  VM 3

Each virtual machine can contain its own operating system and applications.

Virtualization is heavily used in servers, cloud computing, software testing, and development.

Common Operating Systems

Operating System

Typical Uses

Windows

Personal computers, business systems, servers

macOS

Apple Mac computers

Linux

Servers, desktops, cloud systems, embedded devices

Android

Smartphones, tablets, embedded devices

iOS

Apple iPhones

Unix and Unix-like systems

Servers, engineering and specialized computing

Real-time operating systems

Embedded and time-sensitive systems

The exact features of each system differ, but all operating systems perform fundamental tasks such as resource management and application support.

Operating System vs Application Software

A common quiz mistake is confusing operating systems with applications.

Operating System

Application Software

Manages hardware

Performs user-oriented tasks

Provides system services

Uses OS services

Starts as part of the computing environment

Normally runs after the OS is available

Examples: Windows, Linux

Examples: browser, spreadsheet, game

A web browser is therefore not an operating system.

Likewise, an operating system is not simply a collection of applications.

Common Mistakes

Mistake 1: The Kernel and Operating System Are Exactly the Same

The kernel is the central core of an operating system, but an OS normally includes additional system utilities, libraries, interfaces, and services.

Mistake 2: A Program and Process Are Identical

A program is stored code. A process is an executing instance of a program.

Mistake 3: Virtual Memory Is the Same as RAM

RAM is physical memory hardware. Virtual memory is an abstraction managed through the operating system and hardware memory-management mechanisms.

Mistake 4: Multitasking Means Every Program Executes at Exactly the Same Instant

A single CPU core may rapidly switch between runnable tasks. True simultaneous execution requires multiple appropriate execution resources.

Mistake 5: The GUI Is the Entire Operating System

The graphical interface is only one part of the overall operating environment.

Memory Tips

Remember the main responsibilities of an operating system with:

PMFDSS

  • Process management

  • Memory management

  • File management

  • Device management

  • Security

  • Scheduling

For the basic computer stack, remember:

User → Application → OS → Hardware

For execution:

Program stored = program
Program running = process

For process structure:

Process → one or more threads

Summary

An operating system is the primary system software responsible for managing computer hardware and providing services to applications.

The kernel forms the core of the operating system and manages critical resources. Processes represent running programs, while threads represent execution paths within processes. CPU schedulers decide which runnable tasks receive processor time.

Memory management allocates RAM and supports mechanisms such as virtual memory and paging. File systems organize persistent information, while device drivers allow the operating system to communicate with hardware.

Operating systems also provide user interfaces, networking, security, resource protection, and access-control mechanisms. Different OS types—including desktop, server, mobile, embedded, real-time, and multiuser systems—are designed for different computing requirements.

Understanding these concepts provides a foundation for studying computer architecture, programming, cybersecurity, networking, databases, cloud computing, and software engineering.

FAQ

1. What is an operating system?

An operating system is system software that manages hardware resources and provides services and an execution environment for computer programs.

2. What is the kernel?

The kernel is the central, privileged part of an operating system that manages resources such as processors, memory, and hardware devices.

3. What is a process?

A process is an executing program together with resources such as code, data, memory, and operating-system state.

4. What is the difference between a process and a thread?

A process provides a resource and execution environment. A thread is an execution path inside a process. One process can contain several threads.

5. What is virtual memory?

Virtual memory provides each process with a virtual address space that the system maps to physical memory and supporting storage mechanisms.

6. What does a CPU scheduler do?

The scheduler decides which runnable task should receive CPU execution time.

7. What is a device driver?

A device driver is software that allows an operating system to control and communicate with hardware devices.

8. What is a file system?

A file system is the method an operating system uses to organize, name, store, and retrieve files and related information.

9. What is multitasking?

Multitasking is the ability of an operating system to manage multiple tasks so that they can make progress during the same period.

10. What is a real-time operating system?

A real-time operating system is designed to provide predictable responses to events within required timing constraints.

Key Takeaways

  • An operating system manages computer hardware and provides services for applications.

  • The kernel is the privileged core responsible for critical resource management.

  • Processes contain executing programs, while threads provide execution paths within processes.

  • CPU scheduling, virtual memory, file systems, device drivers, and security are major OS functions.

  • Operating systems range from general-purpose desktop and server systems to mobile, embedded, and real-time systems.

References

  1. National Institute of Standards and Technology (NIST) — Operating System Glossary. Provides definitions describing an operating system as software that manages hardware resources and provides services to programs. NIST Operating System Glossary

  2. NIST — Operating System Lexicon. Defines system software responsible for managing computer hardware and software resources. NIST Operating System Definition

  3. OpenStax — Introduction to Computer Science: What Is an Operating System? Educational overview of operating-system roles and architecture. OpenStax: What Is an Operating System?

  4. Microsoft Learn — Processes, Threads, and Apartments. Official documentation explaining processes and threads in the Windows environment. Microsoft Learn: Processes and Threads

  5. Microsoft Learn — Virtual Address Space. Official documentation explaining virtual addresses, process address spaces, page tables, and physical-memory translation. Microsoft Learn: Virtual Address Space

  6. The Linux Kernel Documentation — Memory Management. Official Linux documentation covering virtual memory, demand paging, allocation, page management, and related mechanisms. Linux Kernel: Memory Management

  7. The Linux Kernel Documentation — Scheduler. Official documentation covering Linux CPU scheduling mechanisms. Linux Kernel: Scheduler Documentation

  8. National Institute of Standards and Technology (NIST) — Least Privilege Glossary. Defines the security principle of granting only the minimum necessary system privileges and resources. NIST: Least Privilege