Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Synchronization in work-stealing deque #183

Open
clef-men opened this issue Jan 6, 2025 · 1 comment
Open

Synchronization in work-stealing deque #183

clef-men opened this issue Jan 6, 2025 · 1 comment

Comments

@clef-men
Copy link

clef-men commented Jan 6, 2025

In src/ws_deque.ml, the tab field is not atomic, contrary to the reference implementation in relaxed memory (Correct and Efficient Work-Stealing for Weak Memory Models). Furthermore, there is no synchronization before writing to this field in push and pop_as. Therefore, in my understanding, there is no guarantee that the thieves do not read Obj.magic () (from realloc) when accessing tab in steal_as (same scenario as https://fzn.fr/readings/errata-ppopp207-le.txt).

Are you sure it is correct? Maybe it relies on a synchronization mechanism I am not aware of.

@lyrm
Copy link
Collaborator

lyrm commented Jan 21, 2025

Thanks for reporting this ! I will have a look.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants