From 45bec716879c02b41e41e4858c0bf61f25cf7232 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=98yvind=20Skaaden?= Date: Tue, 18 May 2021 19:29:40 +0200 Subject: [PATCH] Finish all videoes --- ntnu/21v/ttk4145/summary/summary.md | 31 +++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/ntnu/21v/ttk4145/summary/summary.md b/ntnu/21v/ttk4145/summary/summary.md index 4d6f699..79b2e86 100644 --- a/ntnu/21v/ttk4145/summary/summary.md +++ b/ntnu/21v/ttk4145/summary/summary.md @@ -507,3 +507,34 @@ t1(){ t2(){ * ... any other interface +#### Some standard problems/pit-falls + +* **Race condition**: A bug that surfaces by unfortunate timing or order of events +* **Deadlock:** system in circular wait + * Special case of livelock + * Does not use CPU +* **Livelock:** system locked in a subset of states + * like deadlock, but we use CPU + * Busy-Waiting is a livelock +* **Starvation:** A thread does "by accident" not get the necessary resources + + +#### Features in syncronization + +* Critical Section - Code that must not be interupted +* Mutual Exclusion - More piecesof code that must not interrupt each other +* Bounded buffer - Buffer with full/empty synchronization +* Read/Write Locks + * Readers can interleave eachother + * Writers have mutual exclusion +* Condition Syncronization - Blocking on event or status + * Guards etc. +* Resource allocation + * More than mutual exclution! + * Ref: The lock manager +* Rendezvouz/barriere - Synchronization point + * Ref: AA "end boundary" +* Communication +* Broadcast +* ... +