Ref: https://www.cs.emory.edu/~cheung/Courses/554/Syllabus/7-serializability/2PL1.html