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.