Course contentsShow
← Computer Science
Lesson 1199 of 2,87228. Operating Systems FundamentalsFree lesson

Core OS Services: Process Management

Identify how the OS creates, schedules, and terminates processes to manage program execution.

Core OS Services: Process Management

You'll learn: How the operating system creates, schedules, and terminates processes to manage multiple programs running on your computer.

What is a Process?

A process is a program in execution—it's your code brought to life with its own memory space, execution state, and resources. Think of it like a recipe (the program) versus actually cooking the meal (the process). You might cook the same recipe multiple times simultaneously in different pots—each is a separate process.

The Process Lifecycle

The OS manages three key process operations:

1. Creation

When you launch a program, the OS:

  • Allocates memory for code and data
  • Creates a process control block (PCB) storing the process's state (like an ID card with vital info)
  • Assigns a unique process ID (PID)
  • Loads the program into memory

2. Scheduling

With many processes competing for CPU time, the OS scheduler decides which process runs next. This happens constantly—thousands of times per second—giving the illusion that everything runs simultaneously. The scheduler considers priority levels and fairness, rotating CPU access among waiting processes.

3. Termination

When a process finishes or crashes, the OS:

  • Reclaims its memory and resources
  • Updates the process table
  • Returns an exit status to the parent process

Why This Matters

Without process management, only one program could run at a time. The OS creates the multi-tasking environment you rely on, letting you browse the web, listen to music, and edit documents "simultaneously" by rapidly switching between processes.

Key Takeaway: Process management is the OS service that creates processes from programs, schedules which process gets CPU time, and cleans up when processes terminate—enabling modern multi-tasking computing.