Concurrent Programming
This repository holds all my answers to the exercises for the 202.2 Concurrent Programming course
Note
Some exercises may not be complete, although most of them are fully functioning
Table of Contents
- Exercises
- Lab 01 - Thread Objects and Synchronization
- Lab 01 (bis) - Thread Objects and Synchronization
- Lab 02 - Liveness, Guarded Blocks and Immutable Objects
- Lab 02 (bis) - Liveness, Guarded Blocks and Immutable Objects
- Lab 03 - Lock Objects
- Lab 03 (bis) - Lock Objects
- Lab 04 - Executors, Callable and Fork-Join
- Lab 05 - Concurrent Collections and Atomic Variables
- Lab 06 - Synchronizers
- Lab 07 (Workshop) - Summarizing exercises
 
Exercises
Lab 01 - Thread Objects and Synchronization
- A: Defining and Starting A Thread
- B: Pausing Execution With Sleep
- C: Interruptions
- D: Joins
- E: Thread Interference: Managing Bank Accounts
- F: Synchronized Methods: Ensuring consistent operations on bank accounts
- G: Synchronized Statements
Lab 01 (bis) - Thread Objects and Synchronization
Lab 02 - Liveness, Guarded Blocks and Immutable Objects
- H1: Refactoring from Deadlocks
- H2: Bridge crossing without deadlock
- I: Starvation: simulating the access of employees to a conference room
- J: Livelock : couple eating
- K: Guarded Blocks : managing packages in a post office
- L: Immutable objects: From person to statue
Lab 02 (bis) - Liveness, Guarded Blocks and Immutable Objects
- Kbis1: Guarded Blocks : a service desk
- Kbis2: Playing Tennis
Lab 03 - Lock Objects
- M: ReentrantLock: Sharing a Vehicle in a couple
- N: ReentrantReadWriteLock: News Feed
- O: ReentrantLockWithConditions: NumberProducersConsumers
Lab 03 (bis) - Lock Objects
Lab 04 - Executors, Callable and Fork-Join
- P: Executors for Drums
- Pbis: Christmas Lights Task Scheduler
- Q1: Callables and Futures for a Pizzeria
- Q2: Fork/Join: Song
- Q3: Arrays.parallelSort
- Q4: Concurrent Array Sum Calculation
Lab 05 - Concurrent Collections and Atomic Variables
- R: BlockingQueue: Simulating a PostOffice
- S1: ConcurrentHashMap in the Farm
- S2: Comparing Atomic Arrays and Standard Arrays
- S3: java.util.concurrent.atomic package: Creativity
Lab 06 - Synchronizers
- T: Semaphore for Dog Feeding
- U: CountDownLatch: Starting the Family Trip
- V: CyclicBarrier: Patrouille de Glaciers
- W: Exchanger: Bring my Car to the Garage
- X: Phaser for the Next Family Bike Trip
- y: Synchronized Race (former exam)
Lab 07 (Workshop) - Summarizing exercises
- Z1: The dining philosophers
- Z2: The Sleeping Barber Problem
- Z3: Print Queue Management
- Z4: Concurrent Auction Problem
Description
				
					Languages
				
				
								
								
									Java
								
								100%