+ log files

This commit is contained in:
Johannes Theiner 2020-03-15 12:52:39 +01:00
parent 0f969e4355
commit 13a65c168c
7 changed files with 552 additions and 12 deletions

View File

@ -25,12 +25,6 @@ var turn = 1
func Start() { func Start() {
go process1() go process1()
go process2() go process2()
/**
Prozesse wechseln sich immer nur ab.
Ablauf ist 1,2,1,2,1,2,1,2,1,2
*/
} }
// process1 simulates the behaviour of the first process // process1 simulates the behaviour of the first process
@ -51,7 +45,7 @@ L1:
controller.OutsideCriticalSection(1, 100) controller.OutsideCriticalSection(1, 100)
if controller.ProcessCrashed(0.1) { if controller.ProcessCrashed(0.01) {
log.Printf("Process 1 crashed\n") log.Printf("Process 1 crashed\n")
return return
} }
@ -76,7 +70,7 @@ L2:
controller.OutsideCriticalSection(2, 100) controller.OutsideCriticalSection(2, 100)
if controller.ProcessCrashed(0.1) { if controller.ProcessCrashed(0.01) {
log.Printf("Process 2 crashed\n") log.Printf("Process 2 crashed\n")
return return
} }

View File

@ -15,6 +15,7 @@ package ewd123d
import ( import (
"../controller" "../controller"
"log"
) )
// global synchronization variables // global synchronization variables
@ -45,10 +46,10 @@ L1:
controller.OutsideCriticalSection(1, 100) controller.OutsideCriticalSection(1, 100)
/*if controller.ProcessCrashed(0.1) { if controller.ProcessCrashed(0.1) {
log.Println("Process 1 crashed") log.Println("Process 1 crashed")
return return
}*/ }
goto L1 goto L1
} }
@ -70,10 +71,10 @@ L2:
controller.OutsideCriticalSection(2, 100) controller.OutsideCriticalSection(2, 100)
/*if controller.ProcessCrashed(0.1) { if controller.ProcessCrashed(0.1) {
log.Println("Process 2 crashed") log.Println("Process 2 crashed")
return return
}*/ }
goto L2 goto L2
} }

434
protocol/a.txt Normal file
View File

@ -0,0 +1,434 @@
2020/03/11 16:10:15.212947 ewd123.go:33: *** Start Prozesse wechseln sich immer nur ab (Reihenfolge immer 1,2,1,2,1,2,1,2,...)
2020/03/11 16:10:15.325177 controller.go:32: entered CS: 1 Dies führt zu einem Deadlock wenn einer der Prozesse abstürzt.
2020/03/11 16:10:15.325177 controller.go:57: inside CS: 1 (50 msecs)
2020/03/11 16:10:15.376074 controller.go:47: left CS: 1
2020/03/11 16:10:15.376074 controller.go:67: outside CS: 1 (100 msecs)
2020/03/11 16:10:15.376074 controller.go:32: entered CS: 2
2020/03/11 16:10:15.376074 controller.go:57: inside CS: 2 (50 msecs)
2020/03/11 16:10:15.426941 controller.go:47: left CS: 2
2020/03/11 16:10:15.426941 controller.go:67: outside CS: 2 (100 msecs)
2020/03/11 16:10:15.476805 controller.go:32: entered CS: 1
2020/03/11 16:10:15.476805 controller.go:57: inside CS: 1 (50 msecs)
2020/03/11 16:10:15.527786 controller.go:47: left CS: 1
2020/03/11 16:10:15.527786 controller.go:67: outside CS: 1 (100 msecs)
2020/03/11 16:10:15.527786 controller.go:32: entered CS: 2
2020/03/11 16:10:15.527786 controller.go:57: inside CS: 2 (50 msecs)
2020/03/11 16:10:15.578964 controller.go:47: left CS: 2
2020/03/11 16:10:15.578964 controller.go:67: outside CS: 2 (100 msecs)
2020/03/11 16:10:15.627826 controller.go:32: entered CS: 1
2020/03/11 16:10:15.627826 controller.go:57: inside CS: 1 (50 msecs)
2020/03/11 16:10:15.678690 controller.go:47: left CS: 1
2020/03/11 16:10:15.678690 controller.go:67: outside CS: 1 (100 msecs)
2020/03/11 16:10:15.679688 controller.go:32: entered CS: 2
2020/03/11 16:10:15.679688 controller.go:57: inside CS: 2 (50 msecs)
2020/03/11 16:10:15.731549 controller.go:47: left CS: 2
2020/03/11 16:10:15.731549 controller.go:67: outside CS: 2 (100 msecs)
2020/03/11 16:10:15.779421 controller.go:32: entered CS: 1
2020/03/11 16:10:15.779421 controller.go:57: inside CS: 1 (50 msecs)
2020/03/11 16:10:15.830285 controller.go:47: left CS: 1
2020/03/11 16:10:15.830285 controller.go:67: outside CS: 1 (100 msecs)
2020/03/11 16:10:15.832285 controller.go:32: entered CS: 2
2020/03/11 16:10:15.832285 controller.go:57: inside CS: 2 (50 msecs)
2020/03/11 16:10:15.883145 controller.go:47: left CS: 2
2020/03/11 16:10:15.883145 controller.go:67: outside CS: 2 (100 msecs)
2020/03/11 16:10:15.931051 controller.go:32: entered CS: 1
2020/03/11 16:10:15.931051 controller.go:57: inside CS: 1 (50 msecs)
2020/03/11 16:10:15.981880 controller.go:47: left CS: 1
2020/03/11 16:10:15.981880 controller.go:67: outside CS: 1 (100 msecs)
2020/03/11 16:10:15.983874 controller.go:32: entered CS: 2
2020/03/11 16:10:15.983874 controller.go:57: inside CS: 2 (50 msecs)
2020/03/11 16:10:16.034740 controller.go:47: left CS: 2
2020/03/11 16:10:16.034740 controller.go:67: outside CS: 2 (100 msecs)
2020/03/11 16:10:16.082637 controller.go:32: entered CS: 1
2020/03/11 16:10:16.082637 controller.go:57: inside CS: 1 (50 msecs)
2020/03/11 16:10:16.133476 controller.go:47: left CS: 1
2020/03/11 16:10:16.133476 controller.go:67: outside CS: 1 (100 msecs)
2020/03/11 16:10:16.135469 controller.go:32: entered CS: 2
2020/03/11 16:10:16.135469 controller.go:57: inside CS: 2 (50 msecs)
2020/03/11 16:10:16.186335 controller.go:47: left CS: 2
2020/03/11 16:10:16.186335 controller.go:67: outside CS: 2 (100 msecs)
2020/03/11 16:10:16.234206 controller.go:32: entered CS: 1
2020/03/11 16:10:16.234206 controller.go:57: inside CS: 1 (50 msecs)
2020/03/11 16:10:16.285097 controller.go:47: left CS: 1
2020/03/11 16:10:16.285097 controller.go:67: outside CS: 1 (100 msecs)
2020/03/11 16:10:16.287092 controller.go:32: entered CS: 2
2020/03/11 16:10:16.287092 controller.go:57: inside CS: 2 (50 msecs)
2020/03/11 16:10:16.337760 controller.go:47: left CS: 2
2020/03/11 16:10:16.337760 controller.go:67: outside CS: 2 (100 msecs)
2020/03/11 16:10:16.385633 controller.go:32: entered CS: 1
2020/03/11 16:10:16.385633 controller.go:57: inside CS: 1 (50 msecs)
2020/03/11 16:10:16.436497 controller.go:47: left CS: 1
2020/03/11 16:10:16.436497 controller.go:67: outside CS: 1 (100 msecs)
2020/03/11 16:10:16.438518 controller.go:32: entered CS: 2
2020/03/11 16:10:16.438518 controller.go:57: inside CS: 2 (50 msecs)
2020/03/11 16:10:16.488745 controller.go:47: left CS: 2
2020/03/11 16:10:16.488745 controller.go:67: outside CS: 2 (100 msecs)
2020/03/11 16:10:16.537843 controller.go:32: entered CS: 1
2020/03/11 16:10:16.537843 controller.go:57: inside CS: 1 (50 msecs)
2020/03/11 16:10:16.588706 controller.go:47: left CS: 1
2020/03/11 16:10:16.588706 controller.go:67: outside CS: 1 (100 msecs)
2020/03/11 16:10:16.589704 controller.go:32: entered CS: 2
2020/03/11 16:10:16.589704 controller.go:57: inside CS: 2 (50 msecs)
2020/03/11 16:10:16.640099 controller.go:47: left CS: 2
2020/03/11 16:10:16.640099 controller.go:67: outside CS: 2 (100 msecs)
2020/03/11 16:10:16.688988 controller.go:32: entered CS: 1
2020/03/11 16:10:16.688988 controller.go:57: inside CS: 1 (50 msecs)
2020/03/11 16:10:16.739832 controller.go:47: left CS: 1
2020/03/11 16:10:16.739832 controller.go:67: outside CS: 1 (100 msecs)
2020/03/11 16:10:16.740829 controller.go:32: entered CS: 2
2020/03/11 16:10:16.740829 controller.go:57: inside CS: 2 (50 msecs)
2020/03/11 16:10:16.790860 controller.go:47: left CS: 2
2020/03/11 16:10:16.790860 controller.go:67: outside CS: 2 (100 msecs)
2020/03/11 16:10:16.840726 controller.go:32: entered CS: 1
2020/03/11 16:10:16.840726 controller.go:57: inside CS: 1 (50 msecs)
2020/03/11 16:10:16.891587 controller.go:47: left CS: 1
2020/03/11 16:10:16.891587 controller.go:32: entered CS: 2
2020/03/11 16:10:16.891587 controller.go:67: outside CS: 1 (100 msecs)
2020/03/11 16:10:16.891587 controller.go:57: inside CS: 2 (50 msecs)
2020/03/11 16:10:16.941643 controller.go:47: left CS: 2
2020/03/11 16:10:16.941643 controller.go:67: outside CS: 2 (100 msecs)
2020/03/11 16:10:16.993394 controller.go:32: entered CS: 1
2020/03/11 16:10:16.993394 controller.go:57: inside CS: 1 (50 msecs)
2020/03/11 16:10:17.053233 controller.go:47: left CS: 1
2020/03/11 16:10:17.053233 controller.go:67: outside CS: 1 (100 msecs)
2020/03/11 16:10:17.053233 controller.go:32: entered CS: 2
2020/03/11 16:10:17.053233 controller.go:57: inside CS: 2 (50 msecs)
2020/03/11 16:10:17.104123 controller.go:47: left CS: 2
2020/03/11 16:10:17.104123 controller.go:67: outside CS: 2 (100 msecs)
2020/03/11 16:10:17.153963 controller.go:32: entered CS: 1
2020/03/11 16:10:17.153963 controller.go:57: inside CS: 1 (50 msecs)
2020/03/11 16:10:17.204831 controller.go:47: left CS: 1
2020/03/11 16:10:17.204831 controller.go:67: outside CS: 1 (100 msecs)
2020/03/11 16:10:17.204831 controller.go:32: entered CS: 2
2020/03/11 16:10:17.204831 controller.go:57: inside CS: 2 (50 msecs)
2020/03/11 16:10:17.255693 controller.go:47: left CS: 2
2020/03/11 16:10:17.255693 controller.go:67: outside CS: 2 (100 msecs)
2020/03/11 16:10:17.306696 controller.go:32: entered CS: 1
2020/03/11 16:10:17.306696 controller.go:57: inside CS: 1 (50 msecs)
2020/03/11 16:10:17.357054 controller.go:47: left CS: 1
2020/03/11 16:10:17.357054 controller.go:67: outside CS: 1 (100 msecs)
2020/03/11 16:10:17.357054 controller.go:32: entered CS: 2
2020/03/11 16:10:17.357054 controller.go:57: inside CS: 2 (50 msecs)
2020/03/11 16:10:17.407563 controller.go:47: left CS: 2
2020/03/11 16:10:17.407563 controller.go:67: outside CS: 2 (100 msecs)
2020/03/11 16:10:17.457424 controller.go:32: entered CS: 1
2020/03/11 16:10:17.457424 controller.go:57: inside CS: 1 (50 msecs)
2020/03/11 16:10:17.508288 controller.go:47: left CS: 1
2020/03/11 16:10:17.508288 controller.go:67: outside CS: 1 (100 msecs)
2020/03/11 16:10:17.508288 controller.go:32: entered CS: 2
2020/03/11 16:10:17.508288 controller.go:57: inside CS: 2 (50 msecs)
2020/03/11 16:10:17.559157 controller.go:47: left CS: 2
2020/03/11 16:10:17.559157 controller.go:67: outside CS: 2 (100 msecs)
2020/03/11 16:10:17.609021 controller.go:32: entered CS: 1
2020/03/11 16:10:17.609021 controller.go:57: inside CS: 1 (50 msecs)
2020/03/11 16:10:17.659886 controller.go:47: left CS: 1
2020/03/11 16:10:17.659886 controller.go:67: outside CS: 1 (100 msecs)
2020/03/11 16:10:17.659886 controller.go:32: entered CS: 2
2020/03/11 16:10:17.659886 controller.go:57: inside CS: 2 (50 msecs)
2020/03/11 16:10:17.710770 controller.go:47: left CS: 2
2020/03/11 16:10:17.710770 controller.go:67: outside CS: 2 (100 msecs)
2020/03/11 16:10:17.760765 controller.go:32: entered CS: 1
2020/03/11 16:10:17.760765 controller.go:57: inside CS: 1 (50 msecs)
2020/03/11 16:10:17.811151 controller.go:47: left CS: 1
2020/03/11 16:10:17.811151 controller.go:32: entered CS: 2
2020/03/11 16:10:17.811151 controller.go:67: outside CS: 1 (100 msecs)
2020/03/11 16:10:17.811151 controller.go:57: inside CS: 2 (50 msecs)
2020/03/11 16:10:17.862015 controller.go:47: left CS: 2
2020/03/11 16:10:17.862015 controller.go:67: outside CS: 2 (100 msecs)
2020/03/11 16:10:17.911882 controller.go:32: entered CS: 1
2020/03/11 16:10:17.911882 controller.go:57: inside CS: 1 (50 msecs)
2020/03/11 16:10:17.962397 controller.go:47: left CS: 1
2020/03/11 16:10:17.962397 controller.go:32: entered CS: 2
2020/03/11 16:10:17.962397 controller.go:67: outside CS: 1 (100 msecs)
2020/03/11 16:10:17.962397 controller.go:57: inside CS: 2 (50 msecs)
2020/03/11 16:10:18.013291 controller.go:47: left CS: 2
2020/03/11 16:10:18.013291 controller.go:67: outside CS: 2 (100 msecs)
2020/03/11 16:10:18.063132 controller.go:32: entered CS: 1
2020/03/11 16:10:18.063132 controller.go:57: inside CS: 1 (50 msecs)
2020/03/11 16:10:18.114113 controller.go:47: left CS: 1
2020/03/11 16:10:18.114113 controller.go:67: outside CS: 1 (100 msecs)
2020/03/11 16:10:18.114113 controller.go:32: entered CS: 2
2020/03/11 16:10:18.114113 controller.go:57: inside CS: 2 (50 msecs)
2020/03/11 16:10:18.164779 controller.go:47: left CS: 2
2020/03/11 16:10:18.164779 controller.go:67: outside CS: 2 (100 msecs)
2020/03/11 16:10:18.214256 controller.go:32: entered CS: 1
2020/03/11 16:10:18.214256 controller.go:57: inside CS: 1 (50 msecs)
2020/03/11 16:10:18.265124 controller.go:47: left CS: 1
2020/03/11 16:10:18.265124 controller.go:32: entered CS: 2
2020/03/11 16:10:18.265124 controller.go:67: outside CS: 1 (100 msecs)
2020/03/11 16:10:18.265124 controller.go:57: inside CS: 2 (50 msecs)
2020/03/11 16:10:18.315274 controller.go:47: left CS: 2
2020/03/11 16:10:18.315274 controller.go:67: outside CS: 2 (100 msecs)
2020/03/11 16:10:18.366592 controller.go:32: entered CS: 1
2020/03/11 16:10:18.366592 controller.go:57: inside CS: 1 (50 msecs)
2020/03/11 16:10:18.427425 controller.go:47: left CS: 1
2020/03/11 16:10:18.427425 controller.go:67: outside CS: 1 (100 msecs)
2020/03/11 16:10:18.427425 controller.go:32: entered CS: 2
2020/03/11 16:10:18.427425 controller.go:57: inside CS: 2 (50 msecs)
2020/03/11 16:10:18.478289 controller.go:47: left CS: 2
2020/03/11 16:10:18.478289 controller.go:67: outside CS: 2 (100 msecs)
2020/03/11 16:10:18.528779 controller.go:32: entered CS: 1
2020/03/11 16:10:18.528779 controller.go:57: inside CS: 1 (50 msecs)
2020/03/11 16:10:18.578896 controller.go:47: left CS: 1
2020/03/11 16:10:18.578896 controller.go:32: entered CS: 2
2020/03/11 16:10:18.578896 controller.go:57: inside CS: 2 (50 msecs)
2020/03/11 16:10:18.578896 controller.go:67: outside CS: 1 (100 msecs)
2020/03/11 16:10:18.629790 controller.go:47: left CS: 2
2020/03/11 16:10:18.629790 controller.go:67: outside CS: 2 (100 msecs)
2020/03/11 16:10:18.679657 controller.go:32: entered CS: 1
2020/03/11 16:10:18.679657 controller.go:57: inside CS: 1 (50 msecs)
2020/03/11 16:10:18.730555 controller.go:47: left CS: 1
2020/03/11 16:10:18.730555 controller.go:67: outside CS: 1 (100 msecs)
2020/03/11 16:10:18.730555 controller.go:32: entered CS: 2
2020/03/11 16:10:18.730555 controller.go:57: inside CS: 2 (50 msecs)
2020/03/11 16:10:18.781070 controller.go:47: left CS: 2
2020/03/11 16:10:18.781070 controller.go:67: outside CS: 2 (100 msecs)
2020/03/11 16:10:18.831443 controller.go:32: entered CS: 1
2020/03/11 16:10:18.831443 controller.go:57: inside CS: 1 (50 msecs)
2020/03/11 16:10:18.882692 controller.go:47: left CS: 1
2020/03/11 16:10:18.882692 controller.go:67: outside CS: 1 (100 msecs)
2020/03/11 16:10:18.882692 controller.go:32: entered CS: 2
2020/03/11 16:10:18.882692 controller.go:57: inside CS: 2 (50 msecs)
2020/03/11 16:10:18.933557 controller.go:47: left CS: 2
2020/03/11 16:10:18.933557 controller.go:67: outside CS: 2 (100 msecs)
2020/03/11 16:10:18.983423 controller.go:32: entered CS: 1
2020/03/11 16:10:18.983423 controller.go:57: inside CS: 1 (50 msecs)
2020/03/11 16:10:19.033921 controller.go:47: left CS: 1
2020/03/11 16:10:19.033921 controller.go:67: outside CS: 1 (100 msecs)
2020/03/11 16:10:19.033921 controller.go:32: entered CS: 2
2020/03/11 16:10:19.033921 controller.go:57: inside CS: 2 (50 msecs)
2020/03/11 16:10:19.083980 controller.go:47: left CS: 2
2020/03/11 16:10:19.083980 controller.go:67: outside CS: 2 (100 msecs)
2020/03/11 16:10:19.135842 controller.go:32: entered CS: 1
2020/03/11 16:10:19.135842 controller.go:57: inside CS: 1 (50 msecs)
2020/03/11 16:10:19.197261 controller.go:47: left CS: 1
2020/03/11 16:10:19.197261 controller.go:67: outside CS: 1 (100 msecs)
2020/03/11 16:10:19.197261 controller.go:32: entered CS: 2
2020/03/11 16:10:19.197261 controller.go:57: inside CS: 2 (50 msecs)
2020/03/11 16:10:19.248067 controller.go:47: left CS: 2
2020/03/11 16:10:19.248067 controller.go:67: outside CS: 2 (100 msecs)
2020/03/11 16:10:19.297925 controller.go:32: entered CS: 1
2020/03/11 16:10:19.297925 controller.go:57: inside CS: 1 (50 msecs)
2020/03/11 16:10:19.348658 controller.go:47: left CS: 1
2020/03/11 16:10:19.348658 controller.go:67: outside CS: 1 (100 msecs)
2020/03/11 16:10:19.348658 controller.go:32: entered CS: 2
2020/03/11 16:10:19.348658 controller.go:57: inside CS: 2 (50 msecs)
2020/03/11 16:10:19.399562 controller.go:47: left CS: 2
2020/03/11 16:10:19.399562 controller.go:67: outside CS: 2 (100 msecs)
2020/03/11 16:10:19.449436 controller.go:32: entered CS: 1
2020/03/11 16:10:19.449436 controller.go:57: inside CS: 1 (50 msecs)
2020/03/11 16:10:19.500304 controller.go:47: left CS: 1
2020/03/11 16:10:19.500304 controller.go:32: entered CS: 2
2020/03/11 16:10:19.500304 controller.go:67: outside CS: 1 (100 msecs)
2020/03/11 16:10:19.500304 controller.go:57: inside CS: 2 (50 msecs)
2020/03/11 16:10:19.551164 controller.go:47: left CS: 2
2020/03/11 16:10:19.551164 controller.go:67: outside CS: 2 (100 msecs)
2020/03/11 16:10:19.601043 controller.go:32: entered CS: 1
2020/03/11 16:10:19.601043 controller.go:57: inside CS: 1 (50 msecs)
2020/03/11 16:10:19.651843 controller.go:47: left CS: 1
2020/03/11 16:10:19.651843 controller.go:67: outside CS: 1 (100 msecs)
2020/03/11 16:10:19.651843 controller.go:32: entered CS: 2
2020/03/11 16:10:19.651843 controller.go:57: inside CS: 2 (50 msecs)
2020/03/11 16:10:19.702702 controller.go:47: left CS: 2
2020/03/11 16:10:19.702702 controller.go:67: outside CS: 2 (100 msecs)
2020/03/11 16:10:19.752141 controller.go:32: entered CS: 1
2020/03/11 16:10:19.752141 controller.go:57: inside CS: 1 (50 msecs)
2020/03/11 16:10:19.803029 controller.go:47: left CS: 1
2020/03/11 16:10:19.803029 controller.go:67: outside CS: 1 (100 msecs)
2020/03/11 16:10:19.803029 controller.go:32: entered CS: 2
2020/03/11 16:10:19.803029 controller.go:57: inside CS: 2 (50 msecs)
2020/03/11 16:10:19.853256 controller.go:47: left CS: 2
2020/03/11 16:10:19.853256 controller.go:67: outside CS: 2 (100 msecs)
2020/03/11 16:10:19.903127 controller.go:32: entered CS: 1
2020/03/11 16:10:19.903127 controller.go:57: inside CS: 1 (50 msecs)
2020/03/11 16:10:19.954015 controller.go:47: left CS: 1
2020/03/11 16:10:19.954015 controller.go:67: outside CS: 1 (100 msecs)
2020/03/11 16:10:19.954015 controller.go:32: entered CS: 2
2020/03/11 16:10:19.954015 controller.go:57: inside CS: 2 (50 msecs)
2020/03/11 16:10:20.004881 controller.go:47: left CS: 2
2020/03/11 16:10:20.004881 controller.go:67: outside CS: 2 (100 msecs)
2020/03/11 16:10:20.054746 controller.go:32: entered CS: 1
2020/03/11 16:10:20.054746 controller.go:57: inside CS: 1 (50 msecs)
2020/03/11 16:10:20.105403 controller.go:47: left CS: 1
2020/03/11 16:10:20.105403 controller.go:32: entered CS: 2
2020/03/11 16:10:20.105403 controller.go:67: outside CS: 1 (100 msecs)
2020/03/11 16:10:20.105403 controller.go:57: inside CS: 2 (50 msecs)
2020/03/11 16:10:20.156159 controller.go:47: left CS: 2
2020/03/11 16:10:20.156159 controller.go:67: outside CS: 2 (100 msecs)
2020/03/11 16:10:20.206016 controller.go:32: entered CS: 1
2020/03/11 16:10:20.206016 controller.go:57: inside CS: 1 (50 msecs)
2020/03/11 16:10:20.256769 controller.go:47: left CS: 1
2020/03/11 16:10:20.256769 controller.go:67: outside CS: 1 (100 msecs)
2020/03/11 16:10:20.256769 controller.go:32: entered CS: 2
2020/03/11 16:10:20.256769 controller.go:57: inside CS: 2 (50 msecs)
2020/03/11 16:10:20.307659 controller.go:47: left CS: 2
2020/03/11 16:10:20.307659 controller.go:67: outside CS: 2 (100 msecs)
2020/03/11 16:10:20.357065 controller.go:32: entered CS: 1
2020/03/11 16:10:20.357065 controller.go:57: inside CS: 1 (50 msecs)
2020/03/11 16:10:20.407933 controller.go:47: left CS: 1
2020/03/11 16:10:20.407933 controller.go:67: outside CS: 1 (100 msecs)
2020/03/11 16:10:20.407933 controller.go:32: entered CS: 2
2020/03/11 16:10:20.407933 controller.go:57: inside CS: 2 (50 msecs)
2020/03/11 16:10:20.458797 controller.go:47: left CS: 2
2020/03/11 16:10:20.458797 controller.go:67: outside CS: 2 (100 msecs)
2020/03/11 16:10:20.508660 controller.go:32: entered CS: 1
2020/03/11 16:10:20.508660 controller.go:57: inside CS: 1 (50 msecs)
2020/03/11 16:10:20.559427 controller.go:47: left CS: 1
2020/03/11 16:10:20.559427 controller.go:32: entered CS: 2
2020/03/11 16:10:20.559427 controller.go:67: outside CS: 1 (100 msecs)
2020/03/11 16:10:20.559427 controller.go:57: inside CS: 2 (50 msecs)
2020/03/11 16:10:20.610295 controller.go:47: left CS: 2
2020/03/11 16:10:20.610295 controller.go:67: outside CS: 2 (100 msecs)
2020/03/11 16:10:20.660163 controller.go:32: entered CS: 1
2020/03/11 16:10:20.660163 controller.go:57: inside CS: 1 (50 msecs)
2020/03/11 16:10:20.710589 controller.go:47: left CS: 1
2020/03/11 16:10:20.710589 controller.go:32: entered CS: 2
2020/03/11 16:10:20.710589 controller.go:67: outside CS: 1 (100 msecs)
2020/03/11 16:10:20.710589 controller.go:57: inside CS: 2 (50 msecs)
2020/03/11 16:10:20.761049 controller.go:47: left CS: 2
2020/03/11 16:10:20.761049 controller.go:67: outside CS: 2 (100 msecs)
2020/03/11 16:10:20.810893 controller.go:32: entered CS: 1
2020/03/11 16:10:20.810893 controller.go:57: inside CS: 1 (50 msecs)
2020/03/11 16:10:20.861861 controller.go:47: left CS: 1
2020/03/11 16:10:20.861861 controller.go:67: outside CS: 1 (100 msecs)
2020/03/11 16:10:20.861861 controller.go:32: entered CS: 2
2020/03/11 16:10:20.861861 controller.go:57: inside CS: 2 (50 msecs)
2020/03/11 16:10:20.912066 controller.go:47: left CS: 2
2020/03/11 16:10:20.912066 controller.go:67: outside CS: 2 (100 msecs)
2020/03/11 16:10:20.962274 controller.go:32: entered CS: 1
2020/03/11 16:10:20.962274 controller.go:57: inside CS: 1 (50 msecs)
2020/03/11 16:10:21.013162 controller.go:47: left CS: 1
2020/03/11 16:10:21.013162 controller.go:67: outside CS: 1 (100 msecs)
2020/03/11 16:10:21.013162 controller.go:32: entered CS: 2
2020/03/11 16:10:21.013162 controller.go:57: inside CS: 2 (50 msecs)
2020/03/11 16:10:21.064003 controller.go:47: left CS: 2
2020/03/11 16:10:21.064003 controller.go:67: outside CS: 2 (100 msecs)
2020/03/11 16:10:21.113930 controller.go:32: entered CS: 1
2020/03/11 16:10:21.113930 controller.go:57: inside CS: 1 (50 msecs)
2020/03/11 16:10:21.164443 controller.go:47: left CS: 1
2020/03/11 16:10:21.164443 controller.go:67: outside CS: 1 (100 msecs)
2020/03/11 16:10:21.164443 controller.go:32: entered CS: 2
2020/03/11 16:10:21.164443 controller.go:57: inside CS: 2 (50 msecs)
2020/03/11 16:10:21.215280 controller.go:47: left CS: 2
2020/03/11 16:10:21.215280 controller.go:67: outside CS: 2 (100 msecs)
2020/03/11 16:10:21.265146 controller.go:32: entered CS: 1
2020/03/11 16:10:21.265146 controller.go:57: inside CS: 1 (50 msecs)
2020/03/11 16:10:21.315660 controller.go:47: left CS: 1
2020/03/11 16:10:21.315660 controller.go:32: entered CS: 2
2020/03/11 16:10:21.315660 controller.go:57: inside CS: 2 (50 msecs)
2020/03/11 16:10:21.315660 controller.go:67: outside CS: 1 (100 msecs)
2020/03/11 16:10:21.366249 controller.go:47: left CS: 2
2020/03/11 16:10:21.366249 controller.go:67: outside CS: 2 (100 msecs)
2020/03/11 16:10:21.415699 controller.go:32: entered CS: 1
2020/03/11 16:10:21.415699 controller.go:57: inside CS: 1 (50 msecs)
2020/03/11 16:10:21.466596 controller.go:47: left CS: 1
2020/03/11 16:10:21.466596 controller.go:67: outside CS: 1 (100 msecs)
2020/03/11 16:10:21.466596 controller.go:32: entered CS: 2
2020/03/11 16:10:21.466596 controller.go:57: inside CS: 2 (50 msecs)
2020/03/11 16:10:21.517460 controller.go:47: left CS: 2
2020/03/11 16:10:21.517460 controller.go:67: outside CS: 2 (100 msecs)
2020/03/11 16:10:21.567362 controller.go:32: entered CS: 1
2020/03/11 16:10:21.567362 controller.go:57: inside CS: 1 (50 msecs)
2020/03/11 16:10:21.618201 controller.go:47: left CS: 1
2020/03/11 16:10:21.618201 controller.go:67: outside CS: 1 (100 msecs)
2020/03/11 16:10:21.618201 controller.go:32: entered CS: 2
2020/03/11 16:10:21.618201 controller.go:57: inside CS: 2 (50 msecs)
2020/03/11 16:10:21.669069 controller.go:47: left CS: 2
2020/03/11 16:10:21.669069 controller.go:67: outside CS: 2 (100 msecs)
2020/03/11 16:10:21.718931 controller.go:32: entered CS: 1
2020/03/11 16:10:21.718931 controller.go:57: inside CS: 1 (50 msecs)
2020/03/11 16:10:21.769402 controller.go:47: left CS: 1
2020/03/11 16:10:21.769402 controller.go:32: entered CS: 2
2020/03/11 16:10:21.769402 controller.go:67: outside CS: 1 (100 msecs)
2020/03/11 16:10:21.769402 controller.go:57: inside CS: 2 (50 msecs)
2020/03/11 16:10:21.820262 controller.go:47: left CS: 2
2020/03/11 16:10:21.820262 controller.go:67: outside CS: 2 (100 msecs)
2020/03/11 16:10:21.870240 controller.go:32: entered CS: 1
2020/03/11 16:10:21.870240 controller.go:57: inside CS: 1 (50 msecs)
2020/03/11 16:10:21.920489 controller.go:47: left CS: 1
2020/03/11 16:10:21.920489 controller.go:32: entered CS: 2
2020/03/11 16:10:21.920489 controller.go:67: outside CS: 1 (100 msecs)
2020/03/11 16:10:21.920489 controller.go:57: inside CS: 2 (50 msecs)
2020/03/11 16:10:21.971133 controller.go:47: left CS: 2
2020/03/11 16:10:21.971133 controller.go:67: outside CS: 2 (100 msecs)
2020/03/11 16:10:22.021005 controller.go:32: entered CS: 1
2020/03/11 16:10:22.021005 controller.go:57: inside CS: 1 (50 msecs)
2020/03/11 16:10:22.071405 controller.go:47: left CS: 1
2020/03/11 16:10:22.071405 controller.go:32: entered CS: 2
2020/03/11 16:10:22.071405 controller.go:57: inside CS: 2 (50 msecs)
2020/03/11 16:10:22.071405 controller.go:67: outside CS: 1 (100 msecs)
2020/03/11 16:10:22.122383 controller.go:47: left CS: 2
2020/03/11 16:10:22.122383 controller.go:67: outside CS: 2 (100 msecs)
2020/03/11 16:10:22.172138 controller.go:32: entered CS: 1
2020/03/11 16:10:22.172138 controller.go:57: inside CS: 1 (50 msecs)
2020/03/11 16:10:22.222596 controller.go:47: left CS: 1
2020/03/11 16:10:22.222596 controller.go:32: entered CS: 2
2020/03/11 16:10:22.222596 controller.go:57: inside CS: 2 (50 msecs)
2020/03/11 16:10:22.222596 controller.go:67: outside CS: 1 (100 msecs)
2020/03/11 16:10:22.273484 controller.go:47: left CS: 2
2020/03/11 16:10:22.273484 controller.go:67: outside CS: 2 (100 msecs)
2020/03/11 16:10:22.322766 controller.go:32: entered CS: 1
2020/03/11 16:10:22.322766 controller.go:57: inside CS: 1 (50 msecs)
2020/03/11 16:10:22.373284 controller.go:47: left CS: 1
2020/03/11 16:10:22.373284 controller.go:67: outside CS: 1 (100 msecs)
2020/03/11 16:10:22.374282 controller.go:32: entered CS: 2
2020/03/11 16:10:22.374282 controller.go:57: inside CS: 2 (50 msecs)
2020/03/11 16:10:22.425145 controller.go:47: left CS: 2
2020/03/11 16:10:22.425145 controller.go:67: outside CS: 2 (100 msecs)
2020/03/11 16:10:22.473589 controller.go:32: entered CS: 1
2020/03/11 16:10:22.473589 controller.go:57: inside CS: 1 (50 msecs)
2020/03/11 16:10:22.524047 controller.go:47: left CS: 1
2020/03/11 16:10:22.524047 controller.go:67: outside CS: 1 (100 msecs)
2020/03/11 16:10:22.526013 controller.go:32: entered CS: 2
2020/03/11 16:10:22.526013 controller.go:57: inside CS: 2 (50 msecs)
2020/03/11 16:10:22.576512 controller.go:47: left CS: 2
2020/03/11 16:10:22.576512 controller.go:67: outside CS: 2 (100 msecs)
2020/03/11 16:10:22.624099 controller.go:32: entered CS: 1
2020/03/11 16:10:22.624099 controller.go:57: inside CS: 1 (50 msecs)
2020/03/11 16:10:22.674959 controller.go:47: left CS: 1
2020/03/11 16:10:22.674959 controller.go:67: outside CS: 1 (100 msecs)
2020/03/11 16:10:22.676954 controller.go:32: entered CS: 2
2020/03/11 16:10:22.676954 controller.go:57: inside CS: 2 (50 msecs)
2020/03/11 16:10:22.727473 controller.go:47: left CS: 2
2020/03/11 16:10:22.727473 controller.go:67: outside CS: 2 (100 msecs)
2020/03/11 16:10:22.775188 controller.go:32: entered CS: 1
2020/03/11 16:10:22.775188 controller.go:57: inside CS: 1 (50 msecs)
2020/03/11 16:10:22.825565 controller.go:47: left CS: 1
2020/03/11 16:10:22.825565 controller.go:67: outside CS: 1 (100 msecs)
2020/03/11 16:10:22.827560 controller.go:32: entered CS: 2
2020/03/11 16:10:22.827560 controller.go:57: inside CS: 2 (50 msecs)
2020/03/11 16:10:22.877637 controller.go:47: left CS: 2
2020/03/11 16:10:22.877637 controller.go:67: outside CS: 2 (100 msecs)
2020/03/11 16:10:22.927501 controller.go:32: entered CS: 1
2020/03/11 16:10:22.927501 controller.go:57: inside CS: 1 (50 msecs)
2020/03/11 16:10:22.978449 controller.go:47: left CS: 1
2020/03/11 16:10:22.978449 controller.go:32: entered CS: 2
2020/03/11 16:10:22.978449 controller.go:67: outside CS: 1 (100 msecs)
2020/03/11 16:10:22.978449 controller.go:57: inside CS: 2 (50 msecs)
2020/03/11 16:10:23.029267 controller.go:47: left CS: 2
2020/03/11 16:10:23.029267 controller.go:67: outside CS: 2 (100 msecs)
2020/03/11 16:10:23.078556 controller.go:32: entered CS: 1
2020/03/11 16:10:23.078556 controller.go:57: inside CS: 1 (50 msecs)
2020/03/11 16:10:23.129424 controller.go:47: left CS: 1
2020/03/11 16:10:23.129424 controller.go:67: outside CS: 1 (100 msecs)
2020/03/11 16:10:23.129424 controller.go:32: entered CS: 2
2020/03/11 16:10:23.129424 controller.go:57: inside CS: 2 (50 msecs)
2020/03/11 16:10:23.180284 controller.go:47: left CS: 2
2020/03/11 16:10:23.180284 controller.go:67: outside CS: 2 (100 msecs)
2020/03/11 16:10:23.230151 controller.go:32: entered CS: 1
2020/03/11 16:10:23.230151 controller.go:57: inside CS: 1 (50 msecs)
2020/03/11 16:10:23.281053 controller.go:47: left CS: 1
2020/03/11 16:10:23.281053 controller.go:32: entered CS: 2
2020/03/11 16:10:23.281053 controller.go:67: outside CS: 1 (100 msecs)
2020/03/11 16:10:23.281053 controller.go:57: inside CS: 2 (50 msecs)
2020/03/11 16:10:23.331577 controller.go:47: left CS: 2
2020/03/11 16:10:23.331577 controller.go:67: outside CS: 2 (100 msecs)
2020/03/11 16:10:23.381444 controller.go:32: entered CS: 1
2020/03/11 16:10:23.381444 controller.go:57: inside CS: 1 (50 msecs)
2020/03/11 16:10:23.431858 controller.go:47: left CS: 1
2020/03/11 16:10:23.431858 controller.go:32: entered CS: 2
2020/03/11 16:10:23.431858 controller.go:67: outside CS: 1 (100 msecs)
2020/03/11 16:10:23.431858 controller.go:57: inside CS: 2 (50 msecs)
2020/03/11 16:10:23.482397 controller.go:47: left CS: 2
2020/03/11 16:10:23.482397 controller.go:67: outside CS: 2 (100 msecs)
2020/03/11 16:10:23.532342 ewd123a.go:49: Process 1 crashed

14
protocol/b.txt Normal file
View File

@ -0,0 +1,14 @@
2020/03/11 16:13:30.312550 ewd123.go:33: *** Start
2020/03/11 16:13:30.435731 controller.go:32: entered CS: 2
2020/03/11 16:13:30.435731 controller.go:57: inside CS: 2 (50 msecs)
2020/03/11 16:13:30.486109 controller.go:47: left CS: 2
2020/03/11 16:13:30.486109 controller.go:67: outside CS: 2 (100 msecs)
2020/03/11 16:13:30.586466 controller.go:32: entered CS: 2
2020/03/11 16:13:30.586466 controller.go:57: inside CS: 2 (50 msecs)
2020/03/11 16:13:30.586466 controller.go:29: Process 1 tried to enter the critical section while it was already occupied by: 2
Process finished with exit code 1
Inspiziert ein Prozess die Statusvariable des anderen bevor dieser diese ändert, aber nachdem dieser die des anderen inspiziert,
versuchen beide Prozesse gleichzeitig in die Kritische Sektion zu wechseln.

14
protocol/c.txt Normal file
View File

@ -0,0 +1,14 @@
2020/03/11 16:13:55.057638 ewd123.go:33: *** Start
2020/03/11 16:13:55.173331 controller.go:32: entered CS: 2
2020/03/11 16:13:55.173331 controller.go:57: inside CS: 2 (50 msecs)
2020/03/11 16:13:55.224196 controller.go:47: left CS: 2
2020/03/11 16:13:55.224196 controller.go:67: outside CS: 2 (100 msecs)
2020/03/11 16:13:55.274062 controller.go:32: entered CS: 1
2020/03/11 16:13:55.274062 controller.go:57: inside CS: 1 (50 msecs)
2020/03/11 16:13:55.324931 controller.go:47: left CS: 1
2020/03/11 16:13:55.324931 controller.go:67: outside CS: 1 (100 msecs)
2020/03/11 16:13:55.324931 controller.go:32: entered CS: 2
2020/03/11 16:13:55.324931 controller.go:57: inside CS: 2 (50 msecs)
2020/03/11 16:13:55.375434 controller.go:47: left CS: 2
2020/03/11 16:13:55.375434 controller.go:67: outside CS: 2 (100 msecs)

43
protocol/d.txt Normal file
View File

@ -0,0 +1,43 @@
2020/03/11 16:14:46.862020 ewd123.go:33: *** Start
2020/03/11 16:14:46.968278 controller.go:32: entered CS: 2
2020/03/11 16:14:46.968278 controller.go:57: inside CS: 2 (50 msecs)
2020/03/11 16:14:47.019143 controller.go:47: left CS: 2
2020/03/11 16:14:47.019143 controller.go:67: outside CS: 2 (100 msecs)
2020/03/11 16:14:47.019143 controller.go:32: entered CS: 1
2020/03/11 16:14:47.019143 controller.go:57: inside CS: 1 (50 msecs)
2020/03/11 16:14:47.070008 controller.go:47: left CS: 1
2020/03/11 16:14:47.070008 controller.go:67: outside CS: 1 (100 msecs)
2020/03/11 16:14:47.119584 controller.go:32: entered CS: 2
2020/03/11 16:14:47.119584 controller.go:57: inside CS: 2 (50 msecs)
2020/03/11 16:14:47.170425 controller.go:47: left CS: 2
2020/03/11 16:14:47.170425 controller.go:67: outside CS: 2 (100 msecs)
2020/03/11 16:14:47.170425 controller.go:32: entered CS: 1
2020/03/11 16:14:47.170425 controller.go:57: inside CS: 1 (50 msecs)
2020/03/11 16:14:47.220903 controller.go:47: left CS: 1
2020/03/11 16:14:47.220903 controller.go:67: outside CS: 1 (100 msecs)
2020/03/11 16:14:47.270770 controller.go:32: entered CS: 2
2020/03/11 16:14:47.270770 controller.go:57: inside CS: 2 (50 msecs)
2020/03/11 16:14:47.321635 controller.go:47: left CS: 2
2020/03/11 16:14:47.321635 controller.go:67: outside CS: 2 (100 msecs)
2020/03/11 16:14:47.321635 controller.go:32: entered CS: 1
2020/03/11 16:14:47.321635 controller.go:57: inside CS: 1 (50 msecs)
2020/03/11 16:14:47.372508 controller.go:47: left CS: 1
2020/03/11 16:14:47.372508 controller.go:67: outside CS: 1 (100 msecs)
2020/03/11 16:14:47.421903 controller.go:32: entered CS: 2
2020/03/11 16:14:47.421903 controller.go:57: inside CS: 2 (50 msecs)
2020/03/11 16:14:47.472767 controller.go:47: left CS: 2
2020/03/11 16:14:47.472767 controller.go:67: outside CS: 2 (100 msecs)
2020/03/11 16:14:47.472767 controller.go:32: entered CS: 1
2020/03/11 16:14:47.472767 controller.go:57: inside CS: 1 (50 msecs)
2020/03/11 16:14:47.523657 controller.go:47: left CS: 1
2020/03/11 16:14:47.523657 controller.go:67: outside CS: 1 (100 msecs)
2020/03/11 16:14:47.573498 ewd123d.go:75: Process 2 crashed
2020/03/11 16:14:47.624388 controller.go:32: entered CS: 1
2020/03/11 16:14:47.624388 controller.go:57: inside CS: 1 (50 msecs)
2020/03/11 16:14:47.675224 controller.go:47: left CS: 1
2020/03/11 16:14:47.675224 controller.go:67: outside CS: 1 (100 msecs)
2020/03/11 16:14:47.775956 ewd123d.go:50: Process 1 crashed
fatal error: all goroutines are asleep - deadlock!
goroutine 1 [chan receive]:
main.main()

40
protocol/dekker.txt Normal file
View File

@ -0,0 +1,40 @@
2020/03/11 16:15:07.966883 ewd123.go:33: *** Start
2020/03/11 16:15:08.082572 controller.go:32: entered CS: 2
2020/03/11 16:15:08.082572 controller.go:57: inside CS: 2 (50 msecs)
2020/03/11 16:15:08.133436 controller.go:47: left CS: 2
2020/03/11 16:15:08.133436 controller.go:67: outside CS: 2 (100 msecs)
2020/03/11 16:15:08.133436 controller.go:32: entered CS: 1
2020/03/11 16:15:08.133436 controller.go:57: inside CS: 1 (50 msecs)
2020/03/11 16:15:08.184300 controller.go:47: left CS: 1
2020/03/11 16:15:08.184300 controller.go:67: outside CS: 1 (100 msecs)
2020/03/11 16:15:08.234172 controller.go:32: entered CS: 2
2020/03/11 16:15:08.234172 controller.go:57: inside CS: 2 (50 msecs)
2020/03/11 16:15:08.285059 controller.go:47: left CS: 2
2020/03/11 16:15:08.285059 controller.go:67: outside CS: 2 (100 msecs)
2020/03/11 16:15:08.285059 controller.go:32: entered CS: 1
2020/03/11 16:15:08.285059 controller.go:57: inside CS: 1 (50 msecs)
2020/03/11 16:15:08.335895 controller.go:47: left CS: 1
2020/03/11 16:15:08.335895 controller.go:67: outside CS: 1 (100 msecs)
2020/03/11 16:15:08.385761 controller.go:32: entered CS: 2
2020/03/11 16:15:08.385761 controller.go:57: inside CS: 2 (50 msecs)
2020/03/11 16:15:08.436638 controller.go:47: left CS: 2
2020/03/11 16:15:08.436638 controller.go:67: outside CS: 2 (100 msecs)
2020/03/11 16:15:08.436638 controller.go:32: entered CS: 1
2020/03/11 16:15:08.436638 controller.go:57: inside CS: 1 (50 msecs)
2020/03/11 16:15:08.487501 controller.go:47: left CS: 1
2020/03/11 16:15:08.487501 controller.go:67: outside CS: 1 (100 msecs)
2020/03/11 16:15:08.537197 controller.go:32: entered CS: 2
2020/03/11 16:15:08.537197 controller.go:57: inside CS: 2 (50 msecs)
2020/03/11 16:15:08.588061 controller.go:47: left CS: 2
2020/03/11 16:15:08.588061 controller.go:32: entered CS: 1
2020/03/11 16:15:08.588061 controller.go:67: outside CS: 2 (100 msecs)
2020/03/11 16:15:08.588061 controller.go:57: inside CS: 1 (50 msecs)
2020/03/11 16:15:08.638926 controller.go:47: left CS: 1
2020/03/11 16:15:08.638926 controller.go:67: outside CS: 1 (100 msecs)
2020/03/11 16:15:08.688793 ewd123dekker.go:96: Process 2 crashed
2020/03/11 16:15:08.738938 controller.go:32: entered CS: 1
2020/03/11 16:15:08.738938 controller.go:57: inside CS: 1 (50 msecs)
2020/03/11 16:15:08.789819 controller.go:47: left CS: 1
2020/03/11 16:15:08.789819 controller.go:67: outside CS: 1 (100 msecs)
2020/03/11 16:15:08.890096 ewd123dekker.go:60: Process 1 crashed
fatal error: all goroutines are asleep - deadlock!