Multithreading
Title Page
Topics
Threads and Processes
Runnable
Example 1: Basics
Thread States
Thread Scheduling
Thread Termination
Example 2: Synchronization
Locks
Example 3: Animation
Code Template
Code and Class Diagram
Sequence Diagram
Output
Diagram
Blocked State
Code Template
Producer
Consumer
Expected Output
Actual Output
Race Condition
Trace
A
bounded
queue is implemented in a fixed portion of memory. Shown below is one implemented in an 8-element array. Note that when the head is removed from the queue, the rest of the elements are also moved.
Lock Metaphor
Built-In Locks
Deadlocks
wait and notifyAll
Trace
Reentrant Locks
Conditions: Waiting
Conditions: Signalling
Phone Booth
Code
Enhancement
Flowchart
Code