Autoplay
Autocomplete
Previous Lesson
Complete and Continue
Extreme Java - Concurrency Performance
Resources - Slides & Exercises
ExtremeJavaConcurrency-2.1 Slides
Exercise Files
01 - Introduction
How the course came about (5:06)
Questions and exercises (11:17)
History of concurrency (4:08)
Benefits of threads (9:46)
Risks of threads (8:19)
Threads are everywhere (3:58)
Short Java 7 & 8 primer (23:15)
Exercises (4:54)
Exercise Walkthrough: Setting up your IDE (5:27)
Exercise Walkthrough: Annotating Persons (4:11)
02 - Thread Safety
Stack vs heap memory (9:58)
Synchronization, Latent defects (5:25)
Atomicity (9:05)
Visibility (8:37)
Confinement (7:37)
Immutability (15:54)
Designing a thread-safe class (8:48)
Exercises (4:19)
Exercise Walkthrough: Thread confined DateFormat (4:10)
Exercise Walkthrough: Stack confined DateFormat (2:10)
Exercise Walkthrough: Object confined DateFormat (1:31)
Exercise Walkthrough: New DateTimeFormatter (2:46)
Exercise Walkthrough: ByteGenerator (5:32)
03 - Building Blocks
Synchronized collections (13:07)
Concurrent collections (8:38)
Livelock with ConcurrentHashMap.computeIfAbsent() (10:06)
CopyOnWrite collections (10:45)
BlockingQueue & producer-consumer (15:57)
Semaphore (5:23)
CountDownLatch (4:42)
Phaser (7:45)
Exercises (2:26)
Exercise Walkthrough: ConcurrentModificationException (19:57)
Exercise Walkthrough: PriorityBlockingQueue (12:36)
04 - Task Execution
Introduction (4:36)
The executor framework (8:44)
ScheduledExecutorService (7:22)
Executor lifecycle (6:32)
Finding exploitable parallelism (7:20)
Callable and Future (6:02)
CompletionService (6:50)
CompletableFuture (15:53)
Using parallel streams (6:34)
Exercises (1:44)
Exercise Walkthrough: Parallel factorizer (9:41)
Exercise Walkthrough: Parallel stream factorizer (4:27)
05 - Cancellation
Introduction & Motivation (11:25)
Cooperative vs preemptive (5:05)
Policies in dealing with InterruptedException (13:55)
Code sample with Future.cancel(true) (11:55)
FutureTask life cycle & Java 8 streams (7:09)
Timed tasks & non-interruptible tasks (7:17)
Exercises (0:57)
Exercise Walkthrough: Make the factorizer cancelable (7:35)
06 - Applying Thread Pools
Sizing thread pools, compute vs IO tasks (12:39)
Mixing CPU and IO intensive tasks (3:35)
Thread creation cost amortization (23:59)
Fixed vs cached thread pool configurations (6:47)
Saturation policies & thread factories (6:47)
Exercises (3:03)
Exercise Walkthrough: ThreadPoolSupplier (5:50)
Exercise Walkthrough: Thread Pool MBean (6:16)
Exercise Walkthrough: Sizing ThreadPoolExecutor (4:07)
07 - Fork/Join Framework
Introduction (3:55)
ForkJoinPool and ForkJoinTask (6:16)
Parallelizing Fibonacci with Fork:Join (13:15)
ManagedBlocker (17:04)
Canceling a task and summary (4:26)
Exercises (7:26)
Exercise Walkthrough: Puzzle solver with ForkJoin (14:53)
Exercise Walkthrough: Streams instead of ForkJoin (13:11)
08 - Avoiding Liveness Hazards
Introduction (2:32)
Deadlocks (10:15)
Lock ordering with System.identityHashCode() (9:51)
Benefits of open calls (7:01)
Deadlock in java.util.Vector (8:11)
Avoiding and diagnosing deadlocks (18:21)
Livelocks (7:36)
Exercises (4:15)
Exercise Walkthrough: Solve deadlocks via lock ordering (3:47)
Exercise Walkthrough: Find and eliminate deadlock (11:16)
Exercise Walkthrough: Bonus deadlock puzzle (3:21)
09 - Testing Concurrent Programs
Introduction (6:55)
Automatic tooling (7:22)
Bulk updates (13:14)
Repairing the race condition (4:01)
Testing for performance (5:43)
Exercises (3:53)
Exercise Walkthrough: HandoverQueue test (15:43)
Exercise Walkthrough: LinkedTransferQueue test (7:18)
10 - Performance and Scalability
Introduction (7:12)
Amdahl's & Little's laws (9:13)
Costs introduced by context switching (12:46)
Reducing lock contention (6:21)
Lock splitting & lock striping (6:32)
Monitoring CPU utilization to spot contention (7:23)
11 - Explicit Locks
Introduction (0:56)
AutoCloseable locks (8:05)
Avoiding deadlocks using tryLock() (3:14)
Performance synchronized vs ReentrantLock (3:33)
When to use ReentrantLock (5:22)
ReentrantReadWriteLock (6:06)
StampedLock from Java 8 (13:57)
Exercises (2:33)
Exercise Walkthrough: Better WalkingCollection (7:58)
Exercise Walkthrough: tryLock() for solving deadlocks (5:57)
Exercise Walkthrough: StampedLock with IntList (22:24)
12 - Building Custom Synchronizers
Introduction (3:15)
Managing state dependence (10:37)
Using Condition Queues (12:20)
Explicit condition objects (8:55)
Exercises (1:30)
Exercise Walkthrough: FutureResultIterable (17:31)
13 - Atomic Variables and Nonblocking Synchronization
Introduction (9:27)
CompareAndSwap & VarHandles (23:45)
Shared cache lines & sun.misc.Contended (20:00)
Atomic variable classes (6:41)
Nonblocking algorithms (6:04)
Exercises (4:15)
Exercise Walkthrough: Make an atomic BankAccount (8:35)
14.1 - Memory
Introduction (4:26)
Garbage collection (11:08)
Throughput collector (6:38)
-XX:+PrintFlagsFinal (15:38)
ConcurrentMarkSweep (5:49)
G1 (8:30)
Heap sizing (18:44)
Exercises (1:56)
Exercise Walkthrough: Tune different garbage collectors (10:16)
14.2 - References
Introduction (2:29)
SoftReference (16:40)
WeakReference (31:53)
PhantomReference (12:16)
Exercises (2:07)
Exercise Walkthrough: FailFastCollection with WeakReferences (3:22)
15.1 - Tuning Process
Introduction (1:35)
Big gains quickly (12:14)
The Box (4:39)
Consumers of CPU (2:54)
Microbenchmarking (7:11)
Exercises (2:44)
Exercise Walkthrough: Microbenchmark example (16:12)
15.2 - JIT and HotSpot
Just-in-time compiler (12:23)
Hotspot and tiered compilation (8:28)
Exercises (5:23)
Exercise Walkthrough: Compare JIT settings (7:36)
Exercise Walkthrough: Profiling with JVisualVM (3:11)
15.3 - Typical Problem Areas
Introduction (1:22)
Object creation (5:12)
Strings (37:49)
Regular expressions & exceptions (2:53)
Faster loops & other tricks (12:41)
Exercises (1:32)
Exercise Walkthrough: Make a fast Validator (20:29)
16. Conclusion
That's it, folks! (8:47)
Teach online with
Parallelizing Fibonacci with Fork:Join
Lesson content locked
If you're already enrolled,
you'll need to login
.
Enroll in Course to Unlock