Skip to content

Add linearizability tests for Mutex and Semaphore and fix them #1898

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

Merged
merged 13 commits into from
Apr 23, 2020

Conversation

ndkoval
Copy link
Member

@ndkoval ndkoval commented Apr 1, 2020

Fixes #1737

@ndkoval
Copy link
Member Author

ndkoval commented Apr 1, 2020

After adding the corresponding tests, I figured out that the Semaphore implementation is non-linearizable

@ndkoval ndkoval force-pushed the semaphore-and-mutex-linearizability-test branch from 953da5c to ccc60d6 Compare April 9, 2020 21:05
@ndkoval ndkoval requested a review from elizarov April 9, 2020 21:05
@ndkoval ndkoval changed the title [DRAFT] Add linearizability tests for Mutex and Semaphore and fix the last one Add linearizability tests for Mutex and Semaphore and fix the last one Apr 9, 2020
@ndkoval ndkoval marked this pull request as ready for review April 9, 2020 21:06
@ndkoval ndkoval force-pushed the semaphore-and-mutex-linearizability-test branch from ccc60d6 to 6c4ed63 Compare April 10, 2020 21:43
@ndkoval ndkoval force-pushed the semaphore-and-mutex-linearizability-test branch from 6c4ed63 to 53285c7 Compare April 13, 2020 16:28
@ndkoval ndkoval force-pushed the semaphore-and-mutex-linearizability-test branch from 53285c7 to 7e6beb6 Compare April 13, 2020 16:31
@ndkoval ndkoval changed the title Add linearizability tests for Mutex and Semaphore and fix the last one Add linearizability tests for Mutex and Semaphore and fix them Apr 13, 2020
@ndkoval ndkoval requested a review from elizarov April 14, 2020 15:16
@ndkoval ndkoval requested a review from elizarov April 15, 2020 21:57
Copy link
Contributor

@elizarov elizarov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great job

@elizarov elizarov force-pushed the semaphore-and-mutex-linearizability-test branch from ff13b79 to 2e88c30 Compare April 23, 2020 11:41
@elizarov elizarov merged commit ac42be9 into develop Apr 23, 2020
@elizarov elizarov deleted the semaphore-and-mutex-linearizability-test branch April 23, 2020 17:01
qwwdfsad pushed a commit that referenced this pull request Apr 24, 2020
* Make semaphore implementation linearizable (ignoring extra suspensions)
* Make mutex implementation linearizable (ignoring extra suspensions)
* Add linearizability tests for mutex and semaphore
* Fix `SegmentQueueLCStressTest`

Fixes #1737

Co-authored-by: Roman Elizarov <[email protected]>
recheej pushed a commit to recheej/kotlinx.coroutines that referenced this pull request Dec 28, 2020
…n#1898)

* Make semaphore implementation linearizable (ignoring extra suspensions)
* Make mutex implementation linearizable (ignoring extra suspensions)
* Add linearizability tests for mutex and semaphore
* Fix `SegmentQueueLCStressTest`

Fixes Kotlin#1737

Co-authored-by: Roman Elizarov <[email protected]>
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