From 5d724f868dd024796622d58a5fee005fee52070f Mon Sep 17 00:00:00 2001 From: Nick Leeman Date: Wed, 26 Jan 2022 22:14:35 +0100 Subject: [PATCH] Vault sync: 2022-01-26 22:14:35 --- School/Analyse/Periode 2/Week 1.md | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/School/Analyse/Periode 2/Week 1.md b/School/Analyse/Periode 2/Week 1.md index 2f52248..6155c51 100644 --- a/School/Analyse/Periode 2/Week 1.md +++ b/School/Analyse/Periode 2/Week 1.md @@ -89,7 +89,29 @@ Execution of concurrent program proceeds by executing a sequence of the statemen p1->q2->p2->q1 is not possible. because we are breaking the order of execution of program q. q must execute q1 before q2. # Atomic statement - +Atomic statement model assumes that a statement is executed to completion without the possibility of interleaving statements from other process. + +Main property of atomic statement is: they cant be divided. + +A single machine level instruction is always atomic. + + +# Tracing & testing + +concurrent programs are hard to develop and test. + +Concurrency bugs: + +- Simultaneous access same db record +- Atomicity violatitions +- Deadlocks + +These bugs are hard to detect and fix. + +# Correctness +Sequetial programs wil always give the same result. Debugging makes sense. + +Concurrent programs do not behave like this. Some instances may give correct output and some not.