logo

Crowdly

Binary semaphore S1=1  and S2=1 int x=10 what will be the value of x  afte...

✅ The verified answer to this question is available below. Our community-reviewed solutions help you understand the material better.

Binary semaphore S1=1  and S2=1

int x=10

p0()

{

          p(s1)

          p(s2)

          x=x+1

         v(s2)

         v(s1)

}

                 ------------                  p1()

{

          p(s2)

          p(s1)

           x=x+1

       v(s2)

       v(s1)

}

what will be the value of x  after execution of p0 and p1?

0%
0%
0%
More questions like this

Want instant access to all verified answers on moodle.spit.ac.in?

Get Unlimited Answers To Exam Questions - Install Crowdly Extension Now!