edited by
6,158 views
16 votes
16 votes

Draw the process state transition diagram of an OS in which (i) each process is in one of the five states: created, ready, running, blocked (i.e., sleep or wait), or terminated, and (ii) only non-preemptive scheduling is used by the OS. Label the transitions appropriately.

edited by

2 Answers

Best answer
14 votes
14 votes

Process state transition diagram for an OS which satisfy the below two criteria will be as follows:

  1. each process is in one of the five states: created, ready, running, blocked (i.e., sleep or wait), or terminated, and
  2. only non-preemptive scheduling is used by the OS.

If in question it is asked about the preemptive scheduling then after the $\textsf{running state}$ a process directly go to $\textsf{ready state}.$

edited by
9 votes
9 votes

B.

  1. 1st blank $-$ TestandSet(mutex).
    2nd blank $-$ mutext $=0$;
     
  2. no.
     
  3. say given procedure is not atomic. 1st execute process $p1$. After $A1 \ p1$ is preempted. 2nd process $p2$ now executes full code and enters critical section.  $P1$ resumes and completes the code and enters critical section. So $2$ processes are now in critical section.
edited by

Related questions

35 votes
35 votes
3 answers
4
Kathleen asked Sep 15, 2014
10,075 views
The C language is:A context free languageA context sensitive languageA regular languageParsable fully only by a Turing machine