Day 01Part 03- Operating System Difference between programs and processes.

Day 01Part 03- Operating System Difference between programs and processes.

play-rounded-fill play-rounded-outline play-sharp-fill play-sharp-outline
pause-sharp-outline pause-sharp-fill pause-rounded-outline pause-rounded-fill
00:00

 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.

✔ Example: A .exe file on your computer is a program.

✔ Key Characteristics:
✅ Stored as a file (not executing).
✅ Does not consume CPU or memory until executed.

✅ Static in nature.

 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.

✔ Example: When you open Google Chrome, the program file (chrome.exe) runs as multiple processes to handle different tabs.

✔ Key Characteristics:
✅ Requires CPU and memory.
✅ Dynamic in nature (changes during execution).
✅ Has a Process ID (PID) assigned by the OS.

 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 शुरू होता है)

💡 एक ही Program के multiple processes हो सकते हैं
जैसे आप दो बार 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!

Day 01Part 03- Operating System Difference between programs and processes.



Leave a Reply

Your email address will not be published. Required fields are marked *

error: