Title: Thread Synchronization
Course: CPS 261: Advanced Java Concepts ~ DL & MM MASTER > Section: Learning Units - Bb

Presentations and Videos

- Thread Synchronization lecture video (Time: 26:00)
- Thread Synchronization document

- Synchronization issues when multiple threads access common data. Bank.java illustrates the problem that can occur.
- Using the keyword " synchronized " to fix the problem. You can also use "synchronized" to mark a block of code that needs to be protected. Java enforces the rule: only one thread can be in any synchronized section of an object instance at any one time .
- Deadlocks - Deadlock.java is an example (simple but contrived) of a deadlock that can occur when synchronized regions are not properly handled.