-
Notifications
You must be signed in to change notification settings - Fork 15
Add new section "Shared Resources" and "Lock-Free" #15
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Squash the commits for reviewing.
- Check https://cbea.ms/git-commit/ carefully and refine the git commit messages.
- Always use lowercase filenames.
concurrency-primer.tex
Outdated
then the second thread locks another mutex and subsequently attempts to lock the mutex held by the first thread. | ||
At the same time, the first thread also tries to lock the mutex held by the second thread. | ||
Then the deadlock occurs. | ||
Therefore, we can see that deadlock happens when different threads lock in incompatible orders, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Proofread as following:
Therefore, we can see that deadlock occurs when different threads acquire locks in incompatible orders, leading to system immobilization as threads perpetually wait on each other.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rebase the latest main
branch.
Expand the shared resources from the programmer's view in "Read Modify Write" to the cache-line perspective in section "Shared Resources". Move the original "Cache effects and false sharing" to "Shared Resources". Add an explanation of how the scalability of locks will be limited by cache coherence. Change the title of Section "Atomic operations as building blocks" to "Concurrency tools and synchronization mechanisms". Introduce a blocking mechanism with its issues, including waiting times, deadlock, and scalability. Give an example of how synchronization without using a lock can also lead to a livelock. Introduce the three types of progress, which are wait-free, lock-free, and obstruction-free. - Add a figure containing three tables showing the progress of every thread and the progress of the overall system. Give a SPMC problem to explain how to achieve fully lock-free by using algorithms and data structure designs with appropriate synchronization mechanisms and concurrency tools. - Add two flowcharts: one for "lock-based" solution 1 and another for "lock-based and lock-free" solution 2 and a diagram illustrating different data structures to show different data structures.
Thank @weihsinyeh for contributing! |
Address false sharing issues within shared resources.
Proceed to bottleneck issues in shared resources due to communication.