Operating System Long Questions and AnswersHere in this section of Operating System Long Questions and Answers,We have listed out some of the important Long Questions with Answers on Process State and State Transition Diagram which will help students to answer it correctly in their University Written Exam.

Lists of Long Descriptive type Questions that may be asked in Written Exams.

  • (1)What is process state? Explain state transition diagram. OR What is process state?.

What is process state? Explain state transition diagram. OR What is process state?

Process state:

  • The state of a process is defined by the current activity of that process.
  • During execution, process changes its state

The process can be in any one of the following three possible states.

1) Running (actually using the CPU at that time and running).

2) Ready (runnable; temporarily stopped to allow another process run).

3) Blocked (unable to run until some external event happens).

process state transition



Process state transition diagram

  • Figure above shows the state transition diagram.
  • Logically, the first two states are similar. In both cases the process is willing to run, but in the ready state there is no CPU temporarily available for it.
  • In blocked state, the process cannot run even if the CPU is available to it as the process is waiting for some external event to take place.
  • There four possible transitions between these three states.
  • Transition 1 occurs when the operating system discovers that a process cannot continue right now due to unavailability of input. In other systems including UNIX, when a process reads from a pipe or special file (e.g. terminal) and there is no input available, the process is automatically blocked.
  • Transition 2 and 3 are caused by the process scheduler (a part of the operating system), without the process even knowing about them.
  • Transition 2 occurs when the scheduler decides that the running process has run long enough, and it is time to let another process have some CPU time.
  • Transition 3 occurs when all the other processes have had their fair share and it is time for the first process to get the CPU to run again. The subject of scheduling, that is, deciding which process should run when and for how long, is an important one.
  • Transition 4 occurs when the external event for which a process was waiting (such as the arrival of some input) happens. If no other process is running at that time, transition 3 will be triggered and the process will start running. Otherwise it may have to wait in ready state for a little time until the CPU is available and its turn comes.
Share with : Share on Linkedin Share on Twitter Share on WhatsApp Share on Facebook