Question: The following table contains MIPS assembly code for a lock. Refer to the definition of the ll and sc pairs of MIPS instructions. Rewrite the
The following table contains MIPS assembly code for a lock. Refer to the definition of the ll and sc pairs of MIPS instructions.
Rewrite the code above so that the code may operate correctly. Be sure to avoid any race conditions.
a. try: MOV LL ADDI SC BEQZ MOV R3, R4 R2,0 (R2) R2, R2, 1 R3,0 (R1) R3,try R4, R2
Step by Step Solution
3.51 Rating (154 Votes )
There are 3 Steps involved in it
The following MIPS assembly code for a lock contains a race condition try MOV R3R4 LL R20R2 SC R30R1 ... View full answer
Get step-by-step solutions from verified subject matter experts
