Consider the queue presented in Fig.10.21, a variant of the simple lock-free queue for a single enqueuer and a single dequeuer described in Chapter3.This queue is blocking; that is, removing an item from an empty queue, or adding an item to a full one, causes the threads to spin. Surprisingly, this queue requires only loads and stores and not a more powerful read–modify–write syn chronization operation. Does the queue implementation, however, require the use of a memory barrier? If so, where in the code is such a barrier needed and why? If not, explain why not.
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here