Day 01Part 10-Gate lecture of Operating system for cse – Operating system Process state in simple way
Day 01Part 10-Gate lecture of Operating system for cse – Operating system Process state in simple way
Contents [hide]
- 0.1 Operating System – Process States (GATE CSE) | Day 01 Part 10
- 0.2 Process States in Operating Systems:
- 0.3 1. New:
- 0.4 2. Ready:
- 0.5 3. Running:
- 0.6 4. Blocked/Waiting:
- 0.7 5. Terminated/Exit:
- 0.8 Process State Transition Diagram:
- 0.9 New | v Ready <----> Running | | v v Blocked/Waiting Terminated
- 0.10 Important Transitions Explained:
- 0.11 GATE Exam Key Points:
- 0.12 Sample GATE Question:
- 0.13 Day 01Part 10-Gate lecture of Operating system for cse – Operating system Process state in simple way
- 0.14 OPERATING SYSTEMS LECTURE NOTES MALLA …
- 0.15 OPERATING SYSTEM
- 1
Operating System – Process States (Simplified Explanation)
- 2
5 Main Process States in Operating System
- 3
Extra State (optional): Suspended
- 4
Summary Table:
Operating System – Process States (GATE CSE) | Day 01 Part 10
What is a Process?
A process is a program in execution. It is an active entity, unlike a program, which is a passive collection of instructions.
Process States in Operating Systems:
An operating system handles multiple processes by tracking their states. These states help manage and control the execution of processes effectively.
1. New:
- The process is being created.
- It is not yet ready to execute.
2. Ready:
- The process is ready to execute and waiting for CPU time.
- It is in the queue for CPU allocation.
3. Running:
- The process is currently executing on the CPU.
- Only one process can be in this state on a single-core CPU.
4. Blocked/Waiting:
- The process is waiting for an event to occur, like I/O completion.
- It cannot continue until the event happens.
5. Terminated/Exit:
- The process has completed its execution or has been terminated by the OS.
- It is now removed from the system.
Process State Transition Diagram:
New
|
v
Ready <----> Running
| |
v v
Blocked/Waiting Terminated
|
v
Ready <----> Running
| |
v v
Blocked/Waiting Terminated
Important Transitions Explained:
- New → Ready: Process created, ready to execute.
- Ready → Running: Scheduler selects the process for execution.
- Running → Blocked: Waiting for I/O or resources.
- Blocked → Ready: I/O completed; ready to resume.
- Running → Ready: Preempted by the scheduler (due to time slice completion).
- Running → Terminated: Process completed or terminated.
GATE Exam Key Points:
- Focus on the state transition diagram.
- Understand the difference between Blocked and Ready states.
- Be clear about preemptive vs. non-preemptive scheduling.
Sample GATE Question:
Q. In a multi-programming environment, if a running process is performing an I/O operation, its state is changed to:
(A) Ready
(B) Running
(C) Blocked/Waiting
(D) Terminated
Answer: (C) Blocked/Waiting
Tip: Practice previous GATE questions on process management for better understanding. If you need more detailed explanations or help with problems, just ask!
Day 01Part 10-Gate lecture of Operating system for cse – Operating system Process state in simple way
OPERATING SYSTEMS LECTURE NOTES MALLA …
OPERATING SYSTEM
Sure! Here’s a Day 01 – Part 10 style explanation from a GATE CSE lecture on Operating System Process States, explained in a simple and beginner-friendly way.
Operating System – Process States (Simplified Explanation)
What is a Process?
A process is a program in execution.
When you run any program (like a browser, game, or calculator), it becomes a process.
5 Main Process States in Operating System
Let’s understand it like a life cycle of a process:
1. New
-
The process is being created.
-
Example: You clicked on a program icon, and it’s just loading.
2. Ready
-
Process is loaded into memory and is waiting for CPU.
-
It’s ready to run but hasn’t got the CPU yet.
-
Think of it as standing in a queue.
3. Running
-
The process is currently being executed by the CPU.
-
Only one process (in a single-core system) can be in running state at a time.
4. Waiting (or Blocked)
-
The process is waiting for some I/O (input/output), like reading from disk or user input.
-
It gives up the CPU voluntarily and will return to ready once the I/O is done.
5. Terminated (or Exit)
-
The process has finished execution or is killed due to some error.
-
It leaves the process table.
Extra State (optional): Suspended
Some systems also include:
-
Ready Suspended
-
Blocked Suspended
These are used when the OS moves a process from memory to disk (to free up space), but it’s not dead.
Visual Diagram: Process State Transition
Example to Understand Easily:
Imagine you’re ordering food at a restaurant:
-
New: You just entered and got the menu.
-
Ready: You’re waiting for the waiter to take your order.
-
Running: Waiter is now serving you.
-
Waiting: You’re waiting for food to cook (kitchen is I/O).
-
Terminated: You ate and left.
Summary Table:
State | Meaning |
---|---|
New | Process is being created |
Ready | Waiting to be assigned to the CPU |
Running | CPU is executing instructions |
Waiting | Waiting for I/O to complete |
Terminated | Process has finished or been terminated |
Would you like:
-
A PDF note or diagram of this?
-
GATE-level MCQs on Process States?
-
YouTube lecture in Hindi/English?
Let me know!