Summary
- Multiple threads
- Sometimes called processes
- Single shared memory
- Objects live in memory
- Unpredictable asynchronous delays
Programmers’ View
- Parallel composition, shared memory & interleaving semantics
- Locks & synchronization operations
- Concurrent objects and their clients
<aside> 💡 Problems
Non-deterministic ⇒ Difficult to find & reproduce a bug
Solution ⇒ Using locks (Mutex = Mutual Exclusion)
</aside>
= concurrent objects + their clients
Another example
Concurrent Objects ⇒ written as sequential programs
<aside> 💡 Asynchrony
Sudden unpredictable delays
A memory model describes the writes and reads of threads
Interleaving semantics ⇒ Sequential Consistency (SC) model
(Weak/Relaxed) Memory Models