Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Glen Mével
cosmo
Commits
cff7d97b
Commit
cff7d97b
authored
Feb 26, 2021
by
Glen Mével
Browse files
remark that the queue is blocking
parent
49d57a97
Changes
1
Hide whitespace changes
Inline
Side-by-side
papers/icfp2021/queue-impl.tex
View file @
cff7d97b
...
...
@@ -292,3 +292,20 @@ Possible situations are:
\end{itemize}
%
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).
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment