-
Notifications
You must be signed in to change notification settings - Fork 77
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Analysis of pthread_barrier
s
#1652
base: master
Are you sure you want to change the base?
Conversation
Turns out OS X does not support barriers. |
Does anyone have an idea how this could be done? I'm not sure if one can do better complexity-wise, but it should be possible at least w.r.t. the constants. |
I talked it through with @DrMichaelPetter and we came up with some dynamic programming-like algorithm that hopefully performs better practically, but neither of us see how one can do better complexity wise. |
Apparently mathematicians call this problem the |
This now uses |
Makes use of the$$||_{\mathcal{A}}: \mathcal{A} \to \mathcal{A} \to \{ \textsf{false},\top \}$$ predicate we want to define for (abstract) digests to provide a sound basis for all of our MHP stuff for races and give a principled account of what I added in #518 .
Interestingly, it even does so outside of the context of data races --- which may be a cute insight on top of putting the race analysis on solid foundations with this predicate (and hopefully finding a way to get
pthread_once
to also fit (potentially in a reduced fashion)).Technically, it accumulates the$$||_{\mathcal{A}}$$ is true pairwise among these, as well as with the caller to
capacity
andMHP
information for all calls towait
for each barrier at a global unknown, and checks upon a call towait
that there are at leastmin(capacity)-1
other accesses wherewait
.TODO:
min(capacity)-1
elements whereCloses #1651.