Dekker's Algorithm
Dekker's Algorithm
Presented by:
Binit KC
Sandesh Uparkoti
Introduction to Dekker's Algorithm
Flags
Token
•Purpose: Indicate whether a process
•Purpose: Indicates priority when both
wants to enter the critical section (CS).
•Values: processes have their flags set to TRUE.
•1 (TRUE): Process wants to enter •Values:
•1: One process has priority.
the CS.
•0 (FALSE): Process does not •0: The other process has priority.
want to enter the CS.
•Intent Declaration:
Process 0 declares intent to
enter CS.
•Conflict Resolution:
Checks if Process 1 also
wants to enter; if so, uses
turn to resolve conflict.
•Critical Section Entry:
Enters CS when conflict is
resolved.
•Priority Reassignment:
Gives priority to Process 1
after exiting CS.
•Intent Reset: Resets flag to
indicate exit from CS.
Limitations of Dekker's Algorithm
Busy Waiting
•Inefficiency due to constant checking of flags.
Scalability
•Limited to two processes, difficult to extend.
Conclusion :
exclusion between two processes, ensuring that only one can access
the critical section at a time. By using two flags and a token for priority