In the lock-free algorithm, we attempt to logically remove then o de currby calling curr. next. compare And Set (succ, succ, false, true)(line 55 of Fig XXXXXXXXXXFor each of the following...


In the lock-free algorithm, we attempt to logically remove then o de currby calling curr. next. compare And Set (succ, succ, false, true)(line 55 of Fig. 9.25). For each of the following implementations in which this call is replaced with a different method call, either explain why it is correct or describe an execution in which it fails.


a. We instead call curr. next. compare And Set Mark (false,true), where compare And Set Mark () is a fictional method that atomically performs a normal compare-and-swap operation on just the mark bit.


b. We instead callcurr. next. attempt Mark(succ, true), where attempt Mark()is areal method of the Atomic Markable Referenceclass that atomically changes the mark bit to the specified value if the reference has the expected value, but is allowed to spuriously fail (if there are concurrent modifications).




Dec 07, 2021
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here