Day 01Part 03- Operating System Difference between programs and processes.
Contents
Difference Between Programs and Processes in Operating Systems
In an Operating System (OS), the terms Program and Process are often confused, but they are quite different. Let’s break it down!
What is a Program?
A program is a passive entity that contains a set of instructions written in a programming language (like C, Java, Python) that tells the computer what to do. It is stored on disk or memory but does not execute by itself.
.exe
file on your computer is a program.
What is a Process?
A process is an active entity that represents a running instance of a program. When a program is executed, the OS loads it into memory (RAM), assigns system resources, and creates a process.
chrome.exe
) runs as multiple processes to handle different tabs.
Key Differences Between Program and Process
Feature | Program | Process |
---|---|---|
Definition | A passive set of instructions. | An active execution of a program. |
State | Static (stored in disk). | Dynamic (runs in memory). |
Resource Consumption | Does not use CPU/memory. | Uses CPU, memory, I/O. |
Execution | Needs to be executed. | Already running. |
Example | MS Word.exe file in disk. |
Opened instance of MS Word running in RAM. |
Summary:
- A program is a set of instructions stored on disk (not running).
- A process is an executing instance of a program that uses system resources.
Would you like more details on Process States or Process Scheduling in OS?
Here’s a clear explanation of “Day 01 – Part 03: Difference between Programs and Processes” in the context of an Operating System, useful for beginners, B.Tech students, and GATE aspirants:
Difference Between Program and Process
(ऑपरेटिंग सिस्टम – Operating System)
Aspect | Program | Process |
---|---|---|
Definition | A passive set of instructions. | An active instance of a program in execution. |
State | Static (non-living; stored on disk) | Dynamic (running in memory; alive) |
Stored In | Hard disk or any secondary storage | RAM (main memory) |
Execution | Not executing by itself | Executing — needs CPU and resources |
Lifespan | Permanent until deleted | Temporary — lives during execution only |
Type | Code or file (e.g., .exe , .py , .c ) |
Active job/task (e.g., running a browser) |
Multiple Copies | One program can have multiple processes | Each process is an instance of a program |
Managed By | Stored and managed by the file system | Managed by the Operating System (OS) |
Simple Explanation (in Easy Language)
-
Program:
एक सादा फ़ाइल जिसमें निर्देश होते हैं, जैसे — MS Word, Chrome, Python Script
➤ “Software जैसा जो Hard Disk में पड़ा है।” -
Process:
जब वही प्रोग्राम रन होता है तो OS उसे memory में लाकर execute करता है
➤ “जैसे Chrome खुला हो और आप उसमें वेबसाइट चला रहे हों – वह Process है।”
Example:
-
notepad.exe
→ यह एक Program है (स्टोरेज में पड़ा है) -
जब आप इसे खोलते हैं → एक Process बनती है (execution शुरू होता है)
जैसे आप दो बार Chrome खोलें → दो separate processes बनती हैं
Why is this important in OS?
-
OS manages processes, not just programs
-
CPU scheduling, memory allocation, I/O — सब process-level पर होता है
-
हर process का अपना Process ID (PID), memory, and context होता है
Quick Revision Points:
-
Program = Passive + Static -
Process = Active + Dynamic -
OS सिर्फ़ running processes को handle करता है, stored programs को नहीं
Bonus:
Would you like:
-
A PDF Summary
-
A YouTube Video Script
-
A Diagram Showing Program → Process Flow
Just let me know — I can prepare that for you!