concurrency - Example of execution which is sequentially consistent but not quiescently consistent -
in context of correctness of concurrent programs, sequential consistency stronger condition quiescent consistency according art of multiprocessor programming maurice herlihy , nir shavit(chapter 3) authors mention in 3.4.1 there sequentially consistent executions not quiescently consistent. don't understand how. throw light or provide sample execution ?
consider queue (fifo) enqueue , dequeue elements.
from this dissertation concurrency, read (p.20):
an example of scenario allowed in sequential consistency model , disallowed in quiescent consistency model shown in figure 2.1. 2 processes share concurrent queue data structure. first process enqueues x. @ non-overlapping subsequent interval, second process enqueues y. second process performs dequeue , receives y. example sequentially consistent not quiescently consistent, assuming time between enqueue operations falls outside quiescence interval.
figure 2.1:
t1: --- enq(x) --------------------------- t2: ------------- enq(y) ---- deq():y ----
this history permitted sequential consistency, can either permitted or forbidden quiescent consistency, , forbidden linearizable consistency.
if assume between 2 enqueue queue quiescent, t2 should see changes t1, , dequeue should return x. if assume there no quiescent interval between 2 enqueues, 2 enqueues can reorderd wish, , deq():y consistent.
Comments
Post a Comment