a43eac79a4e3bb10e9cdc0c3ff0da59c9b5782f3
Advanced Multithreading Workshop
This project contains the workshop materials for the Advanced Programming multithreading session. It has been migrated from Gradle to Maven and structured for clear delivery.
Project Structure
src/main/java/workshop/exercises/: Unsolved skeleton files with clearTODOmarkers. These are the templates to distribute to students and use during live coding.src/main/java/workshop/solutions/: Fully implemented reference solutions for grading and internal testing.
Exercises Covered
LockWorkshop: Resolving race conditions on a shared mutable counter using explicitReentrantLockcoordination.SynchronizedWorkshop: Resolving race conditions on a shared mutable counter using intrinsic Java monitors (synchronizedblock).DeadlockPreventionWorkshop: Resolving a classic thread circular wait condition by enforcing global lock ordering based on unique Resource IDs.TaylorSeries: Implementing high-precision math withBigDecimaland calculating the Taylor series for\sin(x)using a thread pool (ExecutorService).
Requirements
- Java 17 or higher
- Apache Maven 3.6+
How to Build and Run
To compile the project:
mvn clean compile
To execute any of the workshop main classes (for example, the Lock Workshop solution):
mvn exec:java -Dexec.mainClass="workshop.solutions.LockWorkshopSolution"
Languages
Java
100%