Advanced Synchronization
Photo by Alistair MacRobert on Unsplash
So far, we've learned how to manage the synchronization of related shared data that is accessed through a single lock---but at what point should we have more locks? And what if we need to ensure persistence of our changes? In this module, we will learn about advanced synchronization techniques. We won't get a chance to implement these this semester, but they will likely be useful to you as you continue your studies and pursue your career.
Learning Objectives
We'll learn about advanced synchronization techniques, including fine-grained locking, conservative two-phase locking, and transactions! These are very cool and solve some interesting problems----we think you will find this unit fun!
Upon completion of this module, you will be able to:
- Motivate the need for advanced synchronization techniques
- Explain the difference between coarse-grained and fine-grained locking
- Describe conservative two-phase locking and identify how it prevents deadlock and provides serializability
- Describe transactions, how they work, and how they provide durability
Learning
- Video: The Case for Advanced Synchronization (8 minutes)
- Video: Fine-Grained Locking (5 minutes)
- Video: Conservative Two-Phase Locking (7 minutes)
- Video: Transactions (13 minutes)
-
Slides that were presented in the videos
Note that these videos have embedded formative assessments---you'll want to watch the videos and complete those before class, so that you can earn participation credit.
Recommended Readings
Completing the readings in this class is highly recommended---it can be very helpful to see how the concepts are explained by a different person, and the extra details can help the pieces fit together.
MH: Atomic Transactions: Intro and Durability (5.1 and 5.4)
From Class
Any in-class resources will be posted here after class.
Evaluating Your Understanding
We are providing these rubrics for each module so that you can better understand what is expected and evaluate your understanding against those expectations. The hope is that, if you find yourself earning a 3 or below, you will continue to enhance your understanding until you find yourself earning a 4 or a 5.
| Standards | 5 | 4 | 3 | 2 |
|---|---|---|---|---|
| Controlling Threads: Advanced Edition | Student accurately explains the purpose and actions of advanced concurrency control mechanisms and accurately demonstrates the use of fine-grained locking and conservative two-phased locking on example problems. | Student satisfactorily explains the purpose and actions of advanced concurrency control mechanisms and accurately demonstrates the use of fine-grained locking and conservative two-phased locking on example problems. | Student satisfactorily explains the purpose and actions of advanced concurrency control mechanisms, but unsatisfactorily demonstrates the use of fine-grained locking and conservative two-phased locking on example problems. | Student does not submit the work OR student un satisfactorily explains the purpose and actions of advanced concurrency control mechanisms and unsatisfactorily demonstrates the use of fine-grained locking and conservative two-phased locking on example problems. |
| Short Answer Questions: Concurrency-Specific | Student submitted answers to given questions that accurately and succinctly answer the questions. | Student submitted answers to given questions that satisfactorily and succinctly answer the questions. | Student submitted answers to given questions that unsatisfactorily answer the questions. | Student does not submit the answers OR submitted answers to given questions that incorrectly answer the questions. |
| Short Answer Questions: Concurrency in the larger system | Student submitted answers to given questions that accurately and succinctly answer the questions. | Student submitted answers to given questions that satisfactorily and succinctly answer the questions. | Student submitted answers to given questions that unsatisfactorily answer the questions. | Student does not submit the answers OR submitted answers to given questions that incorrectly answer the questions. |