Consider the following two modifications for the sorted linked list algorithms: a. In the optimistic algorithm, the contains()method locks two nodes before deciding whether a key is present. Suppose,...


Consider the following two modifications for the sorted linked list algorithms:


a. In the optimistic algorithm, the contains()method locks two nodes before deciding whether a key is present. Suppose, instead, it locks no nodes, returning true if it observes the value, and false other wise.


b. In the lazy algorithm, the contains()method executes without inspecting the locks, but it inspects the mark bit; it returns false if a node is marked for removal. Suppose, instead, the contains()does not inspect the mark bit of the nodes, and returns true even for nodes that may be marked.




Jan 06, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here