logo

Crowdly

The  enter_CS()  and  leave_CS()  functions to implement critical section of a ...

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

The enter_CS() and leave_CS() functions to implement critical section of a process are realized using test-and-set instruction as follows:

void enter_CS(X)

{

while(test-and-set(X));

}

void leave_CS(X)

{

X = 0;

}

In the above solution, X is a memory location associated with the C S and is initialized to 0. The above construct used by    process p1 and p2. So above construct ensures ME?

100%
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!