in Operating System edited by
4,456 views
21 votes
21 votes

A certain processor provides a 'test and set' instruction that is used as follows:

  TSET register, flag

This instruction atomically copies flag to register and sets flag to $1$. Give pseudo-code for implementing the entry and exit code to a critical region using this instruction.

in Operating System edited by
4.5k views

4 Comments

option B shows the disadvantages of using sleep() and wait() calls as wakeups can't be saved for the future use. And thus we go for the semaphores.
0
0
why did you removed part b
0
0

The question is incomplete. Please do complete it...

https://www.geeksforgeeks.org/gate-gate-cs-1999-question-68/

1
1
0
0

6 Answers

0 votes
0 votes

Solution:-

0 votes
0 votes

I think this is solution...please comment if something is wrong

Related questions