0
0
Operating Systemsknowledge~10 mins

Process states (new, ready, running, waiting, terminated) in Operating Systems - Step-by-Step Execution

Choose your learning style9 modes available
Concept Flow - Process states (new, ready, running, waiting, terminated)
New
Ready
Running
Waiting
A process starts as New, moves to Ready when prepared to run, then Running when executing. It may go to Waiting if it needs resources, then back to Ready. Finally, it reaches Terminated when finished.
Execution Sample
Operating Systems
1. Create process -> New
2. Scheduler picks -> Ready to Running
3. Needs I/O -> Running to Waiting
4. I/O done -> Waiting to Ready
5. Process ends -> Running to Terminated
This sequence shows how a process moves through states during its life cycle.
Analysis Table
StepCurrent StateEvent/ConditionNext StateExplanation
1NoneProcess createdNewProcess is created but not ready to run
2NewInitialization completeReadyProcess is ready to run, waiting for CPU
3ReadyCPU scheduler selects processRunningProcess starts executing on CPU
4RunningNeeds I/O or resourceWaitingProcess waits for I/O or event
5WaitingI/O or event completedReadyProcess ready again for CPU
6ReadyCPU scheduler selects processRunningProcess resumes execution
7RunningProcess finishes executionTerminatedProcess ends and is cleaned up
💡 Process reaches Terminated state, ending its lifecycle
State Tracker
Process StateStartAfter Step 2After Step 3After Step 4After Step 5After Step 6Final
StateNoneReadyRunningWaitingReadyRunningTerminated
Key Insights - 3 Insights
Why does a process move from Running to Waiting?
Because it needs to wait for an event like I/O completion, as shown in step 4 of the execution_table.
Can a process go directly from New to Running?
No, it must first become Ready after initialization (step 2), then the scheduler moves it to Running (step 3).
What happens after a process reaches Terminated?
The process is cleaned up and removed from the system; it cannot move to any other state (step 7).
Visual Quiz - 3 Questions
Test your understanding
Look at the execution_table, what is the process state after step 4?
ARunning
BWaiting
CReady
DTerminated
💡 Hint
Check the 'Next State' column for step 4 in the execution_table.
At which step does the process first enter the Ready state?
AStep 1
BStep 3
CStep 2
DStep 4
💡 Hint
Look at the 'Next State' column and find when 'Ready' appears first.
If the process never needs I/O, which state will it skip according to the execution_table?
AWaiting
BReady
CNew
DTerminated
💡 Hint
Check which state is entered only when the process needs to wait for I/O (step 4).
Concept Snapshot
Process states:
- New: Created but not ready
- Ready: Waiting for CPU
- Running: Executing on CPU
- Waiting: Paused for I/O or event
- Terminated: Finished and cleaned up
Processes cycle through these states during execution.
Full Transcript
A process starts in the New state when created. After initialization, it moves to Ready, waiting for CPU time. When the scheduler picks it, it moves to Running and executes. If it needs to wait for I/O or other events, it moves to Waiting. Once the event completes, it returns to Ready. Finally, when the process finishes, it moves to Terminated and is removed from the system. This cycle ensures efficient CPU use and resource management.