Question: NAME dekker VAR wantp 1 : boolean; wantp 2 : boolean; turn : { 0 , 1 , 2 } ; pc 1 : {

NAME dekker VAR wantp1 : boolean; wantp2 : boolean; turn : {0,1,2}; pc1: {0,1,2}; -- not in critical section, in busy wait, in critical section pc2: {0,1,2}; -- not in critical section, in busy wait, in critical seciton INIT pc1=0 & pc2=0 & !wantp1 & !wantp2 & turn=0; RULES -- process 1 pc1=0: wantp1 := true; if (turn =0 & wantp1) turn :=1 else skip fi; if (wantp2) if (turn =2) wantp1 := false; pc1 :=1-- go to busy wait else pc1 :=2 fi else pc1 :=2 fi pc1=1: -- in busy wait if (turn =1) wantp1 := true; pc1 :=2 else pc1 :=1 fi pc1=2: -- in critical section turn :=2; wantp1 := false; pc1 :=0-- process 2 pc2=0: wantp2 := true; if (turn =0 & wantp2) turn :=2 else skip fi; if (wantp1) if (turn =1) wantp2 := false; pc2 :=1-- go to busy wait else pc2 :=2 fi else pc2 :=2 fi pc2=1: -- in busy wait if (turn =2) wantp2 := true; pc2 :=2 else pc2 :=1 fi pc2=2: -- in critical section turn :=1; wantp2 := false; pc2 :=01. Use CTL formulas to express the mutual exclusion and freedom from starvation properties of Dekkers mutual exclusion algorithm. There can be more than one CTL formula needed to express each property. If you write more than 3 formulas for each property, you will be penalised by deducting marks. 2. For each formula, explain whether it is a liveness or safety property. Execute the formulas on the model and report the results. 3. Use these results to detect a bug. Describe a buggy execution in your report. 4. Draw the Kripke structure of the code.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!