Home » Operating Systems

Process and its states | Operating System

Here, we are going to learn processes and its states (new, ready, running, waiting, suspended, terminated) in operating system.
Submitted by Himanshu Singh Bisht, on September 25, 2018

The process is the running instance of the running instance of a program which occupies space in memory (RAM), a program is a passive entity and process is an active entity.

When a process is created it passes through some states,

  1. New
  2. Ready
  3. Running
  4. Waiting
  5. Suspended
  6. Terminated
process 1

1) New State

When a program is double-clicked like a program.exe file in windows, the process comes in new state and a process ID is provided to it and it starts loading in memory. The process of selecting a process for loading in memory is done by Long Term Scheduler.

2) Ready State

When a program is double-clicked like a program.exe file in windows, the process comes in new state and a process ID is provided to it and it starts loading in memory. The process of selecting a process for loading in memory is done by Long Term Scheduler.

3) Running State

The Short-term scheduler selects a process from ready queue to run (i.e provide CPU), then process state become running. At this moment instruction of the program is executing.

4) Waiting State

The process often requires input/output from various devices for that purpose process move to a new state called waiting for a state where the process performs input and output from devices like monitor, keyboard etc. If a process is already performing I/O then other process wait for their turn in device waiting queue.

5) Suspended State

As the memory is limited it cannot contain multi-process at any instance, suppose a new process want to come in memory but there is required space available, and this process has high priority so mid-term scheduler will select a process of low priority and place it in swap area of hard disk, so that when space is available it can again be called out . This state of a process is suspended.

6) Terminated State

When a process performs all the task then PCB of the process is deleted and a process is removed from the memory.






Comments and Discussions

Ad: Are you a blogger? Join our Blogging forum.
Learn PCB Designing: PCB DESIGNING TUTORIAL







Languages: » C » C++ » C++ STL » Java » Data Structure » C#.Net » Android » Kotlin » SQL
Web Technologies: » PHP » Python » JavaScript » CSS » Ajax » Node.js » Web programming/HTML
Solved programs: » C » C++ » DS » Java » C#
Aptitude que. & ans.: » C » C++ » Java » DBMS
Interview que. & ans.: » C » Embedded C » Java » SEO » HR
CS Subjects: » CS Basics » O.S. » Networks » DBMS » Embedded Systems » Cloud Computing » Machine learning » CS Organizations » Linux » DOS
More: » Articles » Puzzles » News/Updates

© https://www.includehelp.com some rights reserved.