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

[Question] list_set doesn't terminate in concurrent tests #800

Closed
buttercrab opened this issue Jan 13, 2023 · 1 comment
Closed

[Question] list_set doesn't terminate in concurrent tests #800

buttercrab opened this issue Jan 13, 2023 · 1 comment
Labels
homework - list_set list_set/{fine_grained,optimistic_fine_grained}.rs question Further information is requested

Comments

@buttercrab
Copy link

I passed all the sequential tests.
However in concurrent tests, I failed due to timeout.
I think the only way that the program doesn't terminate is deadlock.
However, is it possible to have deadlock?
My algorithm runs like this on insert or remove:

  1. Look at head (with lock)
  2. If we should go to next node, we get a lock and drop the lock on head.
  3. At the end when we insert or remove the node, we hold the lock of node before and after.
@buttercrab buttercrab added the question Further information is requested label Jan 13, 2023
@Lee-Janggun
Copy link
Member

For 3, are you trying to hold two additional locks in addition to the one you got in the one in self.find()?

@Lee-Janggun Lee-Janggun added the homework - list_set list_set/{fine_grained,optimistic_fine_grained}.rs label Jan 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
homework - list_set list_set/{fine_grained,optimistic_fine_grained}.rs question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants