Process States & Lifecycle


When you use a computer, you interact with various applications—opening files, browsing the internet, and playing games. But have you ever wondered how your computer ensures everything runs smoothly? That’s where the Operating System (OS) steps in, managing processes just like a restaurant manager overseeing kitchen operations.
To better understand process states and lifecycle, let’s compare it to the journey of a dish being prepared in a restaurant. Each meal goes through different stages before being served—just like a process in a computer system.
The Stages of a Process: From Order to Serving
Just as a dish goes through multiple stages from ordering to serving, a process in a computer goes through different states in its lifecycle:
1️⃣ New (Order Received) – Process Creation
Imagine a customer walking into a restaurant and placing an order.
In computing, when you open an application, the OS creates a new process.
The process is in the new state, waiting for approval to begin execution.
2️⃣ Ready (Ingredients Gathered, Chef is Ready) – Process Waiting for CPU
The kitchen staff gathers ingredients and prepares to cook, but the chef is waiting for an available stove.
Similarly, a process is in the ready state when it has all required resources but is waiting for the CPU to execute it.
The OS schedules which process gets CPU time, just as a restaurant manager assigns a stove to a chef.
3️⃣ Running (Cooking in Progress) – Process Execution
The chef starts cooking the dish.
In computing, the OS assigns CPU time to the process, and it enters the running state.
This is when the application actively performs tasks, like rendering a webpage or executing a command.
4️⃣ Blocked/Waiting (Dish Needs an Ingredient) – Waiting for Input/Resource
Sometimes, a chef needs to pause cooking to fetch more ingredients.
Similarly, a process enters a waiting state when it requires external input (like waiting for a file to load or user input).
The OS moves it to a blocked queue until the resource is available.
5️⃣ Terminated (Dish is Served or Canceled) – Process Completion
Once the dish is cooked, it’s either served or discarded.
In computing, when a process completes execution, it enters the terminated state.
The OS removes it from memory, freeing up resources for new tasks.
How the OS Manages Process States
A restaurant manager oversees kitchen operations to ensure smooth service. Similarly, the OS manages processes efficiently by:
🔹 Process Scheduling: Assigning CPU time to processes, ensuring fair execution.
🔹 Resource Allocation: Distributing memory, CPU time, and other resources.
🔹 Multitasking: Running multiple processes simultaneously, like preparing several dishes at once.
Final Thoughts: Cooking Up Efficient Computing
Next time you open an application, imagine a busy restaurant kitchen where chefs (processes) work on dishes, sometimes waiting for ingredients, sometimes actively cooking, and finally serving delicious meals (executing tasks). 🍽️💻
✅ New Process? An order has been placed.
✅ Ready State? Ingredients are prepped, but waiting for the stove.
✅ Running? Cooking is happening!
✅ Waiting? The chef needs more ingredients.
✅ Terminated? The dish is served or canceled.
Understanding process states helps us appreciate how operating systems efficiently manage multiple tasks—just like a well-organized restaurant! 🚀
Subscribe to my newsletter
Read articles from Rohith Reddy Seelam directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by
