What is the difference between weak honesty and strong justice?

What is the difference between weak honesty and strong justice? What will be an example that contains many variables and many actions?

+8
programming-languages
source share
2 answers

I'm not quite sure, but I believe this is the answer:

Strong versus weak

The scheduler is strictly fair if every process starts infinitely often.

The scheduler is weakly fair if every process is always on.

  • For programs with a shared variable, weak justice is reasonable.
  • For synchronous processes, weak justice is reasonable, but it is not very useful (inclusion is not local)
  • Strong justice is unrealistic (too much accounting)
  • For asynchronous processes, weak justice is reasonable and useful.

Example

a!0 kn:=0; go:=true; do (go ^ a?x ! go:=false) 2 (go ! n:=n + 1) od 

It would be unfair to continue to implement the second alternative, as this would ignore the potential of synchronous communication between two processes that could be executed in an infinite number of cases.

An effective implementation must be reasonable and must ensure that the output command is not delayed unreasonably often after it becomes executable.

What is fair?

  • Such a performance is not very fair, but weakly fair.
  • Assuming strong fairness, the program ends with n = 0.
  • Assuming weak equity, the program may also diverge.
+6
source share
  • Given the transition schedule, weak justice ensures that execution cannot remain forever in a state in which actions leading to other states are activated.
  • With strong justice, no action can be included infinitely often without execution.
+6
source share

All Articles