Friday, September 29, 2023

50 years later, is Two-Phase Locking the best we can do?

Two phase locking (2PL) was the first of the general-purpose Concurrency Controls to be invented which provided Serializability. In fact, 2PL gives more than Serializability, it gives Opacity, a much stronger isolation level.
2PL was published in 1976, which incidentally is the year I was born, and it is likely that Jim Gray and his buddies had this idea long before it was published, which means 2PL first came to existence nearly 50 years ago.
Jim Gray Endowed Scholarship | Paul G. Allen School of Computer Science &  Engineering


After all that time has passed, is this the best we can do?

 Turns out no, we can do better with 2PLSF, but let's start from the begining