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

Double check lock lab. #2

Open
dhanna11 opened this issue Sep 4, 2022 · 1 comment
Open

Double check lock lab. #2

dhanna11 opened this issue Sep 4, 2022 · 1 comment
Assignees

Comments

@dhanna11
Copy link
Owner

dhanna11 commented Sep 4, 2022

I suspect that there's a deadlock condition that the tests aren't triggering.

@dhanna11 dhanna11 self-assigned this Sep 4, 2022
@dhanna11
Copy link
Owner Author

dhanna11 commented Sep 4, 2022

Actually, I suspect that a circular wait and hold condition is broken by checking for a free buffer in the first bucket we lock. If there's a free block within the cache, this check has to eventually succeed, unblocking any threads that would be waiting on this bucket lock.

b = get_lru(bcache.bufs[bucket]);

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

No branches or pull requests

1 participant