GATE Papers >> CSE >> 2016 >> Question No 60

Question No. 60 CSE | GATE 2016

Consider the following proposed solution for the critical section problem. There are $n$ processes: $ P_0\;...\;P_{n-1}\;. $ In the code, function pmax returns an integer not smaller than any of its arguments. For all $i$, t[i] is initialized to zero.

Code for $P_i:$
do {
      c[i]=1; t[i] = pmax(t[0],...,t[n-1])+1; c[i]=0;
     for every j≠i
in {0,...,n-1} {

         while (c[j]);
         while (t[j] != 0 && t[j]<=t[i]);
     Critical Section;
      Remainder Section;
} while (true);

Which one of the following is TRUE about the above solution?

Answer : (A) At most one process can be in the critical section at any time

Solution of Question No 60 of GATE 2016 CSE Paper

It satisfies the mutual exclusion, so only one process can be in the critical section at any time.

vmucmG levitra nizagara

Posted on  18/10/2020 15:08:37  by  dobsonz
oKLiiP write my essay

Posted on  03/12/2020 22:53:14  by  dobson
TqDQEj xnxx videos

Posted on  12/12/2020 20:21:13  by  johnan

Posted on  13/12/2020 05:01:00  by  dobson

Posted on  15/12/2020 06:00:57  by  dobson

Posted on  09/01/2021 09:37:29  by  dobson
BdJj4o waldorf doll

Posted on  09/01/2021 13:52:24  by  johnanz

Posted on  17/01/2021 11:05:17  by  johnanz

Posted on  26/01/2021 14:34:27  by  markus

Posted on  27/01/2021 13:54:33  by  markus
Leave a comment