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.
The question is incomplete. Please do complete it...
https://www.geeksforgeeks.org/gate-gate-cs-1999-question-68/
2nd part of the question: Operating System: GATE CSE 1999 | Question: 20-b (gateoverflow.in)
Solution:-
I think this is solution...please comment if something is wrong
64.3k questions
77.9k answers
244k comments
80.0k users