Concurrency is perhaps the most complex field of programming. It requires a knowledge of multiple fundamental principles, like Memory Model, intrinsic locks and conditions and correct ways of using them, etc., which is difficult to self-teach. In the second lecture we cover deadlocks, thread-safe data structures, thread pools and collaborative termination. We use a tool called JCStress to demonstrate the non-deterministic behaviour of concurrent programs and to see what valid or invalid outcomes they can produce. At the end, using all the acquired knowledge, we try to build a thread-safe lazy singleton and test it with JCStress.
Tallinn, May 23rd 2022.
Slides:
inponomarev.gi...
inponomarev.gi...
1 окт 2024