← All courses
Computer Science / Beginner

Operating Systems

Study the operating system as the manager between applications and hardware, coordinating processes, CPU time, memory, files, and shared resources.

▤ 5 modules✓ 5 PDFs✦ 1 researched video lesson
What you’ll learn

Learning objectives

Distinguish processes from threads
Trace common CPU scheduling strategies
Explain synchronization and deadlock conditions
Describe virtual memory and file-system responsibilities
Video lesson

Learn with freeCodeCamp.org

Open on YouTube  ↗
▶

Operating Systems Course for Beginners

freeCodeCamp.org · About 25 hours (publisher description)

Covers: Processes, threads, CPU scheduling, synchronization, deadlocks, memory management, file systems, and disk scheduling

Course roadmap

Learn it in 5 modules

0 of 5 completed
MODULE 01Ready to learn

Processes and threads

Operating systems create, schedule, and terminate processes. Threads can share data efficiently but must coordinate access. Context switching saves enough execution state to resume another task, and excessive switching has overhead.

View key idea and practice
Key idea

A process is a running program with its own address space and resources. A thread is an execution path within a process that shares some process state.

Worked example

A browser may use separate processes for isolation and threads inside a process to perform work concurrently.

Try it

Give one benefit and one coordination risk of moving two tasks into threads within one process.

Suggested check

Threads share memory and can communicate quickly. They can race while updating shared state, so synchronization or ownership design is needed.

MODULE 02Ready to learn

CPU scheduling

First-come-first-served is simple but can cause long jobs to delay short ones. Round-robin gives each task a time slice. Priority policies can favor urgent work but may starve low-priority tasks without safeguards.

View key idea and practice
Key idea

CPU scheduling selects which ready task runs next. A scheduling policy balances throughput, waiting time, response time, fairness, and priority.

Worked example

An interactive system uses small time slices so a typing application stays responsive while background work continues.

Try it

Choose a scheduling policy for an interactive terminal and explain one trade-off.

Suggested check

Round-robin can improve responsiveness by sharing the CPU, but a very small time slice adds context-switch overhead. Choose a quantum appropriate to the workload.

MODULE 03Ready to learn

Synchronization and deadlocks

Protect shared updates with appropriate locks or atomic operations. Deadlock requires mutual exclusion, hold-and-wait, no preemption, and circular wait. Prevention breaks a condition; avoidance and detection use different information and trade-offs.

View key idea and practice
Key idea

A race condition occurs when behavior depends on unpredictable timing of concurrent operations. A deadlock is a set of tasks waiting indefinitely for resources held by one another.

Worked example

Two bank-transfer tasks lock accounts in opposite orders; consistent lock ordering can prevent a circular wait.

Try it

Name two necessary deadlock conditions and suggest a simple policy that prevents one of them.

Suggested check

Mutual exclusion and circular wait are two conditions. Enforcing a global resource ordering can prevent circular wait by making lock acquisition follow one direction.

MODULE 04Ready to learn

Memory management and virtual memory

Address translation protects processes and lets the system use memory flexibly. A page fault occurs when a needed page is not resident and must be loaded. Excessive paging can make a system slow because storage access is much slower than RAM.

View key idea and practice
Key idea

Virtual memory gives each process an address space that the operating system maps to physical memory. Paging divides memory into fixed-size pages and frames.

Worked example

A process accesses a virtual page; the memory-management unit consults translation information and the operating system loads the page if needed.

Try it

Explain why virtual memory helps isolation and name one performance cost when RAM pressure is high.

Suggested check

Each process uses its own address-space view and permissions, which helps isolate memory. Heavy page faults can cause storage traffic and a large performance drop.

MODULE 05Ready to learn

File systems and durable storage

Applications rely on file operations such as open, read, write, and close. Permissions control access, while caches and write buffers affect when data reaches durable media. Backups remain necessary because file-system correctness cannot prevent every loss.

View key idea and practice
Key idea

A file system organizes named data and metadata on storage devices. It manages directories, permissions, allocation, and recovery behavior.

Worked example

A course application reads a PDF from a path and depends on correct permissions, available storage, and a valid file format.

Try it

A saved document appears in the file list but contains old data after a sudden shutdown. Suggest two relevant concepts to investigate.

Suggested check

Review buffered writes and file-system recovery guarantees, then check whether the application flushed or closed the file correctly. A recent backup may be needed to restore expected content.

Take it further

Study materials

5 real PDFs
Operating Systems

Course introduction

Processes and threads · CPU scheduling · Synchronization and deadlocks

8 pages55 KB
Download  ↓
Operating Systems

Beginner study notes

Processes and threads · CPU scheduling · Synchronization and deadlocks

8 pages55 KB
Download  ↓
Operating Systems

Practical examples

Processes and threads · CPU scheduling · Synchronization and deadlocks

8 pages55 KB
Download  ↓
Operating Systems

Exercises and practice questions

Processes and threads · CPU scheduling · Synchronization and deadlocks

8 pages55 KB
Download  ↓
Operating Systems

Revision summary

Processes and threads · CPU scheduling · Synchronization and deadlocks

8 pages55 KB
Download  ↓