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;
     t[i]=0;
      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.

Comments
vmucmG http://pills2sale.com/ levitra nizagara

Posted on  18/10/2020 15:08:37  by  dobsonz
oKLiiP https://www.quora.com/What-the-top-SEO-keywords-for-essay-you-know/answer/Alan-Smith-1772 write my essay

Posted on  03/12/2020 22:53:14  by  dobson
TqDQEj http://xnxx.in.net/ xnxx videos

Posted on  12/12/2020 20:21:13  by  johnan
sjmggB https://writemyessayforme.web.fc2.com/

Posted on  13/12/2020 05:01:00  by  dobson
7QS5M9 https://writemyessayforme.web.fc2.com/#writemyessay

Posted on  15/12/2020 06:00:57  by  dobson
NQuoD7 https://writemyessayforme.web.fc2.com/octavio-paz-essay-day-of-the-dead.html

Posted on  09/01/2021 09:37:29  by  dobson
BdJj4o http://waldorfdollshop.us/ waldorf doll

Posted on  09/01/2021 13:52:24  by  johnanz
QII7T7 http://nexus.cct.lsu.edu:8000/nexus_uis/930

Posted on  17/01/2021 11:05:17  by  johnanz
ICsGLd https://beeg.x.fc2.com/

Posted on  26/01/2021 14:34:27  by  markus
5E7AAd https://buyzudena.web.fc2.com/

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