Commit cff7d97b authored by Glen Mével's avatar Glen Mével
Browse files

remark that the queue is blocking

parent 49d57a97
...@@ -292,3 +292,20 @@ Possible situations are: ...@@ -292,3 +292,20 @@ Possible situations are:
\end{itemize}% \end{itemize}%
Hence competition happens only between enqueuers, or between dequeuers. Hence competition happens only between enqueuers, or between dequeuers.
A weakness of this implementation, however, is that it is blocking:
if an enqueuer or a dequeuer halts after it has been attributed a rank but before
it updates the corresponding slot, then after some time, any other thread trying
to enqueue or dequeue will fail.
%
%Specifically, if an enqueuer halts after it has been attributed a rank~\idx\ but
%before it updates the corresponding slot, then no dequeuer will be able to
%dequeue the corresponding item, hence the tail will remain blocked at rank~\idx\
%and the head will remain blocked at $\idx+\capacity$ (the queue will remain
%full forever).
%
%Symmetrically, if a dequeuer halts after it has been attributed a rank~\idx\ but
%before it updates the corresponding slot, then no enqueuer will be able to reuse
%the slot for an item of rank~$\idx+\capacity$, hence the head will remain
%blocked at rank~$\idx+\capacity$ and the tail will remain blocked at
%$\idx+\capacity$ (the queue will remain empty forever).
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment