Thread congestion can occur when two or more threads are trying to access the same, guarded data structure at the same time. By "guarded" I mean that the data structure is guarded using synchronized blocks or a concurrent data structure (Lock, BlockingQueue etc.) so that the data structure is thread safe. The resulting thread congestion means that the threads trying to access the shared data structure are spending a high amount of time waiting in line to access the data structure - wasting valuable execution time on waiting.
Chapters:
0:00 Thread congestion introduction
1:40 Thread congestion wastes thread execution time
2:22 Thread congestion alleviation solutions
3:05 Work stealing improvement
3:58 Thread congestion code examples
Thread Congestion in Java - Tutorial - Text:
https://jenkov.com/tutorials/java-con...
Java Concurrency Tutorial - Text:
https://jenkov.com/tutorials/java-con...
Java Concurrency Video Playlist:
• Java Concurrency and Multithreading
Java Thread Visibility is covered in:
• The Java Memory Model - The Basics
• Java Happens Before Guarantee - Java ...
• Java Synchronized - The synchronized ...
• Java Volatile
• CPU Cache Coherence + Java Concurrency