Assume that an instruction test-and-set (TS) has been provided in a machine…
PYQ GATE 1990Modified — slightly modified from the official paper; see the solution
Assume that an instruction test-and-set (TS) has been provided in a machine whose function is as follows: 'the left most bit of the one byte operand is checked and accordingly the condition code (CC) is set to 1 or 0. After checking and setting the condition code, implement a critical region using this instruction. (The check and setting of the condition code are followed by an atomic setting of the tested operand bit to one.)
Sign up free to check your answer
Sign up freeLoading lesson…

