6SENG006C Concurrent Programming — Visual Study Guide (Java)
6SENG006C / 6SENG006W · OFFLINE INTERACTIVE STUDY GUIDE

Java Concurrency, Visualized

No walls of textbook jargon. Every topic starts with a clear everyday model, lets you predict and step through real JVM interleavings, translates Java lines into plain English, and drills the exact exam traps from Weeks 1–4 and your coursework — completely offline.

Course Mastery Progress (saved in this browser) 0%
0 / 6 modules completed
Exam Cram Mode is ON: Long walkthroughs and analogies are hidden across every page, leaving tight recaps, diagrams, exam traps, and comparison tables. Switch back to Full Read anytime in the top bar.

Course Concept Map — How Every Lecture Connects

Click any module node to inspect prerequisites & key traps
M1 · WEEK 1 Threads, Scheduling & Races M2 · WEEK 2 4 synchronized Forms & JMM M3 · WEEKS 2–3 · READY Lifecycle & Monitors (wait/notify) M4 · WEEK 3 BlockingQueue, Locks & R/W M5 · WEEK 4 Semaphores & Classic Problems M6 · COURSEWORK 26/27 & VIVA Health Portal & Late Plate Kitchen Blueprint UPCOMING · WEEKS 5–10 Executors, Virtual Threads & Atomics
M3 · Weeks 2–3 · Ready

Thread Lifecycle & Monitor Coordination

Interactive 6-state thread machine, Predict-Before-Step KitchenWorker tracer, and a unified OrderCounter board with pinned Java lines and lost wake-up exploration.

Open M3 →
Recommended study order: Follow Modules 1 → 5 sequentially so each primitive solves a concrete limitation of the previous one, then use Module 6 to prepare your Level-6 coursework architecture and viva justifications.

Core Study Modules (Weeks 1–4 & Coursework)

Upcoming Syllabus Roadmap (Weeks 5–10)

Quick-Reference Java Concurrency Ledger

Java Primitive Primary Job Ownership & Reentrancy #1 Course Exam Trap
synchronized Mutual exclusion + memory visibility on an object/class monitor. Owned by entering thread; reentrant; auto-released on block exit/exception. Static method locks Class.class; instance method locks this — they do not block each other.
volatile Guarantees visibility across CPU caches (flushes to main memory). No lock, no mutual exclusion. volatile int count; count++; is still a race condition (not atomic).
wait() / notifyAll() Condition coordination inside a synchronized monitor. Must hold that object's lock (else IllegalMonitorStateException); wait() releases only that lock. Using if instead of while (returns null on empty queue), or notify() causing a lost wake-up hang.
BlockingQueue Thread-safe bounded/unbounded producer-consumer handoff (put/take). Internal locks & conditions managed by JDK. Wrapping put()/take() in an extra synchronized method causes double-lock deadlock.
ReentrantLock Explicit lock with tryLock(timeout), fairness, & multiple Conditions. Owned by locking thread; reentrant; manual release. Forgetting lock.unlock() inside a finally block leaks the lock forever on exception.
Semaphore(N, fair) Permit-based access control for N resources or cross-thread signaling. No ownership (any thread can release()); not reentrant. Acquiring mutex before empty/full in 3-Semaphore Producer-Consumer causes deadlock.