Process state diagram


A process passes from number of states during its life, states are as follows-
1) New state
2) Ready state
3) Running state
4) Wait state
5) Termination state
6) Suspend ready state
7) Suspend wait state

Description of all the states are as follows-

New State:
First state is known as new state. New state is the state when the process is under creation.
Ready State:
When the process is created new state comes, which is called ready state.

After creation process comes under ready state.

In ready state more than one process can also come.

For example: One process is created at the same time second process is created then both the process will come under ready state.
Running State:
From ready state we have to select a process, and then have to allot CPU to that process for run.

When CPU is allotted to process in ready state that process comes in running state.

In running state only one process can stay at a time. Because CPU can be allotted to single process at a time.
Wait State:
When a process request for input/output than that process will left the running state, and will join new state known as wait state.

In wait state more than one process can stay.
After completion of I/O request process will go to ready state.
From ready state the process will go to again running state.
Termination State:
When process comes in running state, there is no more input output request by the process, because it's already get completed.

So process will go to termination state.
These are the basic states in process state diagram.

Ready state and wait state can contain many processes, so their size gets increases.

Suspend ready state:
When ready state is not able to occupy more states in it, than some states are suspended in suspended state.
Suspend ready state will be in secondary memory not in primary memory.

When ready state get space for new processes than, processes from suspended ready state gets switch back to ready state.

Such transaction is known as resume.
Suspend wait state:
Similarly suspend wait state is also reside in process state diagram.
Non-Preemptive Operating system: If a process is in running state, and we can't remove that process until it get switches to the wait state or termination state, Such type of operating system is known as non-preemptive operating system.

For example:

Process A is in running state, then we can't remove process A, until it gets in wait state or termination state, such type of process is known as non-preemptive process.

Preemptive Operating system: If a process is in running state and its taking too much time in running state then we switches that process to ready state and new process is allotted running state. Then such type of operating system is known as preemptive operating system.

For example:
Ready state, running state and wait state stay in main memory. And we know that size of main memory is very limited.

  1. If process is in new state, it means process is under creation or process is being created.

  1. Once the process is created it will move to the ready state.

  1. In ready state we have multiple number of processes.

  1. One of the process is selected from ready state and it will be dispatched from ready state to the running state.

  1. When the process is in running state, it means it has occupied the CPU.

  1. In the running state there will be only one process.

  1. When running processes require I/O operation, it will move to the wait state.

  1. Wait state can also have multiple number of processes.

  1. The CPU time of the process will be spent in running state.

  1. The I/O time will be spent in wait state.

  1. When the processes is in ready, running, or wait state the processes residing in main memory.

  1. When the resources are not sufficient to manage process in the ready state, then some of the process will be suspended and will be moved to suspend ready state.

  1. When the process is in suspend ready state, the process is residing in secondary memory.

Operating Systems: covered following topics in Operating Systems.
    A list of Video lectures
    Python Programming ↓ 👆
    Java Programming ↓ 👆
    JAVA covered following topics in these notes.
    JAVA Programs
    Principles of Programming Languages ↓ 👆
    Principles of Programming Languages covered following topics in these notes.

    Previous years solved papers:
    A list of Video lectures References:
    1. Sebesta,”Concept of programming Language”, Pearson Edu 
    2. Louden, “Programming Languages: Principles & Practices” , Cengage Learning 
    3. Tucker, “Programming Languages: Principles and paradigms “, Tata McGraw –Hill. 
    4. E Horowitz, "Programming Languages", 2nd Edition, Addison Wesley

      Computer Organization and Architecture ↓ 👆

      Computer Organization and Architecture covered following topics in these notes.

      1. Structure of desktop computers
      2. Logic gates
      3. Register organization
      4. Bus structure
      5. Addressing modes
      6. Register transfer language
      7. Direct mapping numericals
      8. Register in Assembly Language Programming
      9. Arrays in Assembly Language Programming


      1. William stalling ,“Computer Architecture and Organization” PHI
      2. Morris Mano , “Computer System Organization ”PHI

      Computer Network ↓ 👆
      Computer Network covered following topics in these notes.
      1. Data Link Layer
      2. Framing
      3. Byte count framing method
      4. Flag bytes with byte stuffing framing method
      5. Flag bits with bit stuffing framing method
      6. Physical layer coding violations framing method
      7. Error control in data link layer
      8. Stop and Wait scheme
      9. Sliding Window Protocol
      10. One bit sliding window protocol
      11. A protocol Using Go-Back-N
      12. Selective repeat protocol
      13. Application layer
      1. Andrew S. Tanenbaum, David J. Wetherall, “Computer Networks” Pearson Education.
      2. Douglas E Comer, “Internetworking with TCP/IP Principles, Protocols, And Architecture",Pearson Education
      3. KavehPahlavan, Prashant Krishnamurthy, “Networking Fundamentals”, Wiley Publication.
      4. Ying-Dar Lin, Ren-Hung Hwang, Fred Baker, “Computer Networks: An Open Source Approach”, McGraw Hill.