Operating Systems Fundamentals: Complete Beginner's Guide

Learn what operating systems are, how they work, and their key functions. Explore Linux, Windows, macOS with process management, memory, and file systems explained

πŸ“… Published: March 10, 2025 ✏️ Updated: April 2, 2025 By Ojaswi Athghara
#os #linux #windows #beginners #tutorial #fundamentals

Operating Systems Fundamentals: Complete Beginner's Guide

Three Computers, Three Different Worlds

I remember sitting in the computer lab during my first semester, utterly confused. I had three computers in front of me:

  • My Windows laptop for gaming
  • The lab's Linux machine for programming assignments
  • My roommate's MacBook for design projects

They all looked different, behaved differently, and used different commands. Yet somehow, they all ran programs, saved files, and connected to the internet. How?

That's when my professor introduced us to operating systems: "The operating system is what makes a computer usable. Without it, your hardware is just expensive metal and silicon."

That semester, I dove deep into OS concepts, and suddenly everything clickedβ€”why Linux commands differ from Windows, how programs actually run, and what's happening behind the scenes when I click an icon.

Today, I'll share what I learned about operating systems from a beginner's perspective. If you've ever wondered what an OS actually does or why there are so many different ones, this guide is for you.

What Is an Operating System?

An operating system (OS) is system software that manages computer hardware and software resources. It's the bridge between you (the user) and the computer's hardware.

Simple Analogy

Think of a restaurant:

  • Hardware = The kitchen equipment (stove, oven, fridge)
  • Operating System = The head chef who coordinates everything
  • Applications = The individual dishes being prepared
  • Users = The customers who order food

Just as the head chef manages the kitchenβ€”allocating burners, coordinating cooks, ensuring orders are filled correctlyβ€”the OS manages your computer's CPU, memory, storage, and ensures applications run smoothly.

What Would Happen Without an OS?

I tried to understand this by reading about early computers. Without an OS:

  • You'd have to write code to directly control every hardware component
  • Only one program could run at a time
  • No file systemβ€”you'd track data by physical disk locations
  • No user interfaceβ€”just raw machine code

Example: Want to print something? Without an OS, you'd write hundreds of lines of code to send exact signals to the printer. With an OS, you just click "Print."

Functions of an Operating System

When I started learning OS, I thought it just displayed icons and folders. I was wrong! The OS does so much more:

1. Process Management

What it means: Managing all running programs (called processes)

What I learned: When you open Chrome, Spotify, and VS Code simultaneously, the OS juggles between them so quickly it seems like they're all running at once (even on a single-core CPU!).

# View running processes on Linux
ps aux

# Output shows:
# USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
# alice     1234  2.5  3.1 123456  7890 ?        Sl   10:30   0:05 /usr/bin/python3 app.py
# alice     5678  1.2  5.4 234567  8901 ?        Sl   10:32   0:03 /usr/lib/firefox/firefox

Key concepts:

  • Process creation: Starting new programs
  • Process scheduling: Deciding which process gets CPU time
  • Process termination: Cleaning up when programs close
  • Context switching: Saving one process's state and loading another's

2. Memory Management

What it means: Allocating RAM to programs and ensuring they don't interfere with each other

I wrote a simple program that kept allocating memory:

# Python program that uses memory
data = []
for i in range(10000000):
    data.append(i)  # Keeps taking more RAM

The OS tracked every byte I used and prevented my program from accessing memory belonging to other programs. If I ran out of RAM, the OS used virtual memory (hard disk space) as backup.

Key concepts:

  • Memory allocation: Giving programs the RAM they need
  • Memory protection: Preventing programs from accessing each other's memory
  • Virtual memory: Using disk space when RAM is full
  • Paging: Breaking memory into fixed-size blocks

3. File System Management

What it means: Organizing and storing data on disks

Instead of dealing with disk sectors and clusters, we get a simple file system:

/home/alice/
β”œβ”€β”€ Documents/
β”‚   β”œβ”€β”€ resume.pdf
β”‚   └── notes.txt
β”œβ”€β”€ Pictures/
β”‚   └── vacation.jpg
└── Code/
    └── my_project/
        └── main.py

The OS translates "/home/alice/Documents/resume.pdf" into the actual physical location on your disk.

Key functions:

  • File creation/deletion
  • Directory management
  • Access permissions (who can read/write/execute files)
  • File backup and recovery

4. Device Management

What it means: Controlling hardware devices (keyboard, mouse, printer, USB drives)

When I plug in a USB drive, the OS:

  1. Detects the new device
  2. Loads the appropriate driver
  3. Makes it accessible as a folder
  4. Handles reading/writing data

Linux device files (everything is a file!):

ls -l /dev/
# crw-rw-rw-  1 root tty     5,   0 Jan 15 10:30 /dev/tty      # Terminal
# brw-rw----  1 root disk    8,   0 Jan 15 10:30 /dev/sda      # Hard disk
# crw-------  1 root root   10, 235 Jan 15 10:30 /dev/mouse    # Mouse

5. Security and Access Control

What it means: Protecting your data and controlling who can do what

The OS enforces permissions:

# Linux file permissions
-rw-r--r--  alice  users  1024  resume.pdf   # Alice can read/write, others can only read
-rwx------  alice  users  2048  secret.sh    # Only Alice can read/write/execute
drwxr-xr-x  alice  users  4096  Documents/   # Directory accessible by everyone

Key features:

  • User authentication (login passwords)
  • File permissions
  • Process isolation (programs can't interfere with each other)
  • Firewall integration

Types of Operating Systems

I was confused about why so many OS types exist. Then I realized: different use cases need different designs.

1. Single-User, Single-Tasking OS

What it is: One user, one program at a time

Example: MS-DOS (old Windows predecessor)

My experience: I tried MS-DOS in a virtual machine. I could only run one program at a time. Want to run a text editor while compiling code? Impossible!

C:\> edit myfile.txt    # Opens text editor
# Can't do anything else until you close it!

Use case: Early personal computers, embedded systems

2. Single-User, Multi-Tasking OS

What it is: One user, multiple programs simultaneously

Examples: Windows 10/11, macOS, modern Linux

This is what most of us use! I can write code in VS Code, listen to Spotify, browse Stack Overflow, and run a local serverβ€”all at once.

3. Multi-User OS

What it is: Multiple users can use the system simultaneously

Example: Linux/Unix servers

My experience with university server:

# I log in
ssh alice@university-server.edu

# I can see other users logged in
who
# alice    pts/0    2025-01-15 10:30
# bob      pts/1    2025-01-15 10:45
# charlie  pts/2    2025-01-15 11:00

# We all run programs simultaneously without interfering with each other

Use case: Servers, mainframes, cloud computing

4. Real-Time Operating Systems (RTOS)

What it is: OS that guarantees tasks complete within strict time constraints

Examples: VxWorks, FreeRTOS, QNX

Use cases:

  • Medical devices: Pacemakers must respond in milliseconds
  • Automotive systems: Anti-lock brakes can't have delays
  • Industrial robots: Precise timing is critical

Key difference: A regular OS might say "I'll run this program soon." An RTOS says "I'll run this program in exactly 10 milliseconds, guaranteed."

5. Distributed Operating Systems

What it is: OS that manages multiple computers as if they're one system

Example: Google's server infrastructure

How it works: Your Google search might use 100 servers simultaneously, but the OS makes it seem like one powerful computer.

6. Network Operating Systems

What it is: OS designed to manage network resources

Examples: Windows Server, Linux server distributions

Use case: Managing office networks, file servers, authentication servers

Major Operating Systems: Windows vs Linux vs macOS

Let me share what I learned about the "big three" operating systems:

Windows

Developed by: Microsoft

Market share: ~75% of desktop computers

What I like:

  • User-friendly GUI (Graphical User Interface)
  • Most software/games support Windows
  • Good hardware compatibility
  • Familiar to most people

What I learned the hard way:

  • Frequent updates that sometimes break things
  • More vulnerable to viruses
  • Less control over system internals
  • Proprietary (closed source)

Best for: Gaming, general office work, most mainstream software

File system: NTFS (New Technology File System)

Terminal: Command Prompt, PowerShell

# Windows PowerShell commands
Get-ChildItem          # List files (like 'ls')
Copy-Item              # Copy files
New-Item -ItemType Directory  # Create directory

Linux

Developed by: Linus Torvalds and open-source community

Market share: ~2% desktop (but dominates serversβ€”96% of web servers!)

What I love:

  • Free and open source
  • Incredibly stable (my Linux server ran for 200 days without reboot)
  • Powerful command line
  • Highly customizable
  • Great for programming

Challenges I faced:

  • Steeper learning curve
  • Some software doesn't run on Linux (though this is improving)
  • Driver issues with some hardware
  • Different "flavors" (distributions) can be confusing

Best for: Programming, servers, web development, learning OS internals

Popular distributions:

  • Ubuntu: Beginner-friendly, most popular
  • Fedora: Cutting-edge features
  • Debian: Extremely stable
  • Arch Linux: For advanced users who want full control

File system: ext4 (most common), Btrfs, XFS

Terminal: Bash, Zsh, Fish

# Linux terminal commands
ls -la                 # List all files with details
sudo apt update        # Update package lists (Ubuntu/Debian)
mkdir my_folder        # Create directory
chmod 755 file.sh      # Change file permissions
ps aux                 # View running processes

macOS

Developed by: Apple

Market share: ~15% of desktop computers

What I learned from my roommate's Mac:

  • Beautiful, intuitive interface
  • Unix-based (similar to Linux under the hood!)
  • Great for creative work (design, video editing, music production)
  • Excellent hardware-software integration
  • Good security

Limitations:

  • Only runs on Apple hardware (expensive!)
  • Less software availability than Windows
  • Less customizable than Linux

Best for: Creative professionals, developers who want Unix with better UX

File system: APFS (Apple File System)

Terminal: Zsh (default), Bash available

# macOS Terminal (similar to Linux)
ls -al
brew install wget      # Homebrew package manager
open file.txt          # Open file with default app

Operating System Architecture

Understanding the structure helped me see how everything fits together:

The Kernel

What it is: The core of the OS that directly manages hardware

The kernel is the most important partβ€”it's what runs when you boot up, before anything else.

Types of kernels:

  1. Monolithic Kernel (Linux)
    • Everything runs in kernel space
    • Faster but less stable (one bug can crash the entire system)
  2. Microkernel (macOS, some RTOS)
    • Minimal functionality in kernel
    • Most services run in user space
    • More stable but slightly slower
  3. Hybrid Kernel (Windows)
    • Combination of both approaches

User Space vs Kernel Space

This confused me until I visualized it:

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚        User Applications            β”‚  User Space
β”‚   (Chrome, VS Code, Games, etc.)    β”‚  (Regular programs)
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚         System Libraries            β”‚  
β”‚      (libc, GUI frameworks)         β”‚  
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€  <-- System Call Interface
β”‚           OS Kernel                 β”‚  Kernel Space
β”‚  (Process, Memory, File, Device     β”‚  (Privileged mode)
β”‚   Management)                       β”‚  
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚           Hardware                  β”‚  
β”‚   (CPU, RAM, Disk, Network)         β”‚  
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

User space programs can't directly access hardwareβ€”they must ask the kernel through system calls.

System Calls

What they are: The interface between user programs and the kernel

When you write file.write("Hello") in Python, behind the scenes:

# High-level Python code
with open('test.txt', 'w') as f:
    f.write("Hello")

# What actually happens:
# 1. Python calls C library function write()
# 2. C library makes system call: sys_write()
# 3. Kernel handles the actual disk write
# 4. Returns result to your program

Common system calls:

  • open() - Open a file
  • read() - Read from file
  • write() - Write to file
  • fork() - Create new process
  • exec() - Execute program
  • exit() - Terminate process

Process Management Deep Dive

This was the most fascinating part for meβ€”how the OS juggles multiple programs.

What Is a Process?

Process = Program in execution

When you double-click an app, the OS creates a process:

# Running a Python script
python3 my_app.py

# The OS creates a process with:
# - Process ID (PID): Unique identifier
# - Memory space: RAM allocated to this program
# - Process state: Running, waiting, or stopped
# - CPU registers: Current execution state
# - Open files: Files the program has opened

Process States

Every process goes through these states:

β”Œβ”€β”€β”€β”€β”€β”€β”€β”     β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”     β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”     β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  NEW  β”‚ --> β”‚  READY  β”‚ --> β”‚ RUNNING β”‚ --> β”‚ TERMINATED β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”˜     β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜     β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜     β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                   ↑                β”‚
                   β”‚                ↓
                   β”‚         β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                   └─────────│   WAITING   β”‚
                             β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Explanation:

  1. New: Process is being created
  2. Ready: Process is waiting for CPU time
  3. Running: Process is executing on CPU
  4. Waiting: Process is waiting for I/O (like reading a file)
  5. Terminated: Process has finished

CPU Scheduling

The problem: One CPU, but 50 processes want to run. How does the OS decide?

Scheduling algorithms I learned:

1. First-Come, First-Served (FCFS)

  • Simple: Whoever arrives first runs first
  • Problem: Long processes block short ones

2. Shortest Job First (SJF)

  • Run the quickest processes first
  • Problem: Long processes might never run!

3. Round Robin

  • Give each process a small time slice (like 10ms)
  • Rotate through all processes
  • This is what most OSes use!

4. Priority Scheduling

  • Assign priorities to processes
  • Higher priority = more CPU time

Example of how Round Robin works:

Time: 0-10ms   β†’ Process A runs
Time: 10-20ms  β†’ Process B runs
Time: 20-30ms  β†’ Process C runs
Time: 30-40ms  β†’ Process A runs again
...and so on

Even with 1 CPU, all processes make progress!

Threads vs Processes

Process: Complete program with its own memory space

Thread: Lightweight process that shares memory with other threads in the same process

Example: Chrome browser

  • One process per tab
  • Each process has multiple threads (UI thread, network thread, JavaScript execution thread)
# Python threading example
import threading
import time

def print_numbers():
    for i in range(5):
        print(f"Number: {i}")
        time.sleep(1)

def print_letters():
    for letter in 'ABCDE':
        print(f"Letter: {letter}")
        time.sleep(1)

# Create threads
thread1 = threading.Thread(target=print_numbers)
thread2 = threading.Thread(target=print_letters)

# Start both threads (run simultaneously!)
thread1.start()
thread2.start()

# Output (interleaved):
# Number: 0
# Letter: A
# Number: 1
# Letter: B
# ...

Memory Management Explained

Physical vs Virtual Memory

Physical memory: Actual RAM chips in your computer

Virtual memory: Abstraction that makes each program think it has unlimited memory

What blew my mind: Every process thinks it has access to the entire address space!

Process A thinks:           Process B thinks:
0x00000000 - 0xFFFFFFFF     0x00000000 - 0xFFFFFFFF

But the OS maps them to different physical RAM locations!

What Happens When RAM Is Full?

The OS uses pagingβ€”moving inactive memory pages to disk (called swap space on Linux, page file on Windows).

I experienced this: My laptop had 4GB RAM. When I opened too many Chrome tabs, my computer slowed to a crawl. The OS was constantly swapping memory to disk, which is 1000x slower than RAM!

File Systems Compared

Linux File System (ext4)

Everything is a fileβ€”even devices!

/ (root)
β”œβ”€β”€ bin/         # Essential binaries
β”œβ”€β”€ boot/        # Boot loader files
β”œβ”€β”€ dev/         # Device files
β”œβ”€β”€ etc/         # Configuration files
β”œβ”€β”€ home/        # User directories
β”‚   └── alice/
β”œβ”€β”€ lib/         # Shared libraries
β”œβ”€β”€ proc/        # Process information (virtual)
β”œβ”€β”€ tmp/         # Temporary files
β”œβ”€β”€ usr/         # User programs
└── var/         # Variable data (logs, etc.)

Windows File System (NTFS)

Drive letters (C:, D:, etc.) and paths with backslashes:

C:\
β”œβ”€β”€ Program Files\
β”œβ”€β”€ Users\
β”‚   └── Alice\
β”‚       β”œβ”€β”€ Documents\
β”‚       β”œβ”€β”€ Desktop\
β”‚       └── Downloads\
β”œβ”€β”€ Windows\
└── ProgramData\

File Permissions (Linux)

-rw-r--r--  1 alice users  1024 Jan 15 10:30 document.txt
β”‚β”‚β”‚β”‚β”‚β”‚β”‚β”‚β”‚
││││││││└─ Others: read
│││││││└── Group: read
││││││└─── Owner: read + write
│││││└──── Type: - (file), d (directory), l (link)

Changing permissions:

chmod 755 script.sh    # Owner: rwx, Group: rx, Others: rx
chmod +x script.sh     # Make executable

Operating System vs Kernel vs Firmware

This distinction confused me initially:

Firmware:

  • Lowest-level software
  • Stored in hardware ROM
  • Example: BIOS/UEFI that runs when you press power button

Kernel:

  • Core part of the OS
  • Manages hardware directly
  • Always in memory

Operating System:

  • Kernel + system utilities + GUI
  • The complete package you install

Analogy:

  • Firmware = The instructions wired into a calculator
  • Kernel = The core functions (add, subtract, multiply, divide)
  • OS = The complete calculator app with buttons and display

Common Operating System Mistakes I Made

Mistake 1: Running as Root/Administrator Always

Wrong:

# Running everything as root
sudo su      # Becomes root user
rm -rf /important_folder  # Oops, deleted system files!

Right: Only use admin privileges when necessary!

Mistake 2: Ignoring File Permissions

I made all my files executable because I didn't understand permissions:

chmod 777 everything    # NEVER DO THIS!
# 777 = everyone can read, write, execute

Security risk: Anyone can modify your files!

Mistake 3: Not Understanding Process Management

I'd open 50 Chrome tabs and wonder why my computer froze. I learned to monitor resources:

# Linux - see what's using resources
top
htop       # Better interface

# Kill misbehaving process
kill -9 PID

Which Operating System Should You Learn?

For beginners:

  • Start with what you have (Windows/Mac)
  • Learn command line basics
  • Try Linux in a virtual machine

For programming:

  • Linux (Ubuntu) is best for learning OS concepts
  • Most servers run Linux
  • Better understanding of how things work

For system administration:

  • Learn both Linux (servers) and Windows Server (corporate IT)

For embedded systems:

  • Learn RTOS concepts
  • Understand resource constraints

Hands-On: Try Linux Without Installing

I recommend trying Linux to really understand OS concepts:

Option 1: Virtual Machine

# Using VirtualBox (free)
1. Download VirtualBox
2. Download Ubuntu ISO
3. Create VM with 2GB RAM, 20GB disk
4. Install Ubuntu
5. Experiment without risking your main system!

Option 2: Dual Boot

  • Run Windows and Linux on the same computer
  • Choose which to use at startup

Option 3: WSL (Windows Subsystem for Linux)

  • Run Linux inside Windows
  • Great for developers
# Install WSL on Windows
wsl --install
wsl --install -d Ubuntu

Conclusion: Operating Systems Are Everywhere

After a semester of studying operating systems, I started seeing them everywhere:

  • My phone (Android/iOS)
  • Smart TVs
  • Cars (yes, modern cars have operating systems!)
  • Routers and network devices
  • Even my smart watch

Key takeaways from my learning journey:

  1. OS is the bridge between hardware and softwareβ€”you can't run apps without one
  2. Different OS types exist because different use cases have different needs
  3. Process management is how your computer runs multiple programs smoothly
  4. Memory management gives each program its own protected space
  5. File systems organize data logically, hiding hardware complexity
  6. Linux is excellent for learning OS internals
  7. Understanding OS makes you a better programmer

You don't need to be an expert in OS to use a computer, but understanding the basics:

  • Makes you appreciate how complex modern computers are
  • Helps you troubleshoot problems
  • Improves your programming (you understand what's happening behind the scenes)
  • Opens career opportunities in system administration and embedded systems

Start exploring! Install Linux in a VM, play with command-line tools, and see how processes work. The more you experiment, the more intuitive it becomes.

Remember, every OS expert started exactly where you are nowβ€”curious and confused. The difference is they kept exploring!

Happy computing, and may your processes never deadlock! πŸš€


Learning about operating systems? I'd love to hear about your journey and questions! Connect with me on Twitter or LinkedIn for more computer science discussions.

Support My Work

If this guide helped you understand what operating systems are, how they manage processes and memory, and why we have different OS types, I'd really appreciate your support! Creating comprehensive, beginner-friendly tutorials with practical examples takes significant time and effort. Your support helps me continue sharing knowledge and creating more helpful resources for computer science students.

β˜• Buy me a coffee - Every contribution, big or small, means the world to me and keeps me motivated to create more content!


Cover image by Artiom Vallat on Unsplash

Related Blogs

Ojaswi Athghara

SDE, 4+ Years

Β© ojaswiat.com 2025-2027