Concurrency Abstractions
From Ian Stark on October 17th, 2018
views
comments
From Ian Stark on October 17th, 2018
This lecture reviews the built-in Java concurrency primitives from Lecture 8 and introduces some patterns that can help with using them: immutability, synchronization wrappers, and control abstractions like producer/consumer. More high-level currency abstractions, such as those in the java.util.concurrent package, support programming that is not only thread-safe but takes explicit advantage of concurrency to increase performance and responsiveness.
There are still pitfalls around, though: race conditions and in particular data races that may cause problems in concurrent code. The abstractions described earlier can help manage these challenges, but sometimes at a performance cost. At the end there is a brief walk-through of some some intentionally racy code from the Java <code>String</code> library. This is an example of a “benign” data race which improves performance and, the creators believe, does not introduce surprise behaviour.
Media Hopper Create does not support public attachments to videos, so to download slides please use this alternate website: https://wp.inf.ed.ac.uk/apl18/wp-content/uploads/sites/10/2018/10/apl18-9.pdf
The University of Edinburgh is a charitable body, registered in Scotland, with registration number SC005336, VAT Registration Number GB 592 9507 00, and is acknowledged by the UK authorities as a “Recognised body” which has been granted degree awarding powers.
Unless explicitly stated otherwise, all material is copyright © The University of Edinburgh 2019. Course specific materials are created by University of Edinburgh staff for you to use in your studies. You should not share, publish or sell these outside the University