Skip to content
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

avoid sleeping-relted deadlock (Issue #231) #232

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

jasonzzzzzzz
Copy link

Previous ThreadFini() lacks control of SLEEPING threads in finish().
This change helps many-thread simulation to completion; Otherwise, it deadlocks when running TailBench Apps with only 2-4 threads.

Previous ThreadFini() lacks control of SLEEPING threads in finish(). 
This change helps many-thread simulation to completion; Otherwise, it deadlocks when running TailBench Apps with only 2-4 threads.
@gaomy3832
Copy link
Contributor

I think this fix is correct. Please also clean up the print message and debug notes in the code. Also, it seems you do not need to actually schedule it after you remove it from the sleep queue. It is finishing any way. Simply mark it as BLOCKED and leave it to the later code to deal with.

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

Successfully merging this pull request may close these issues.

2 participants