Peterson's Soltuion

Introduction:

Peterson's solution provides a good algorithmic description of solving the critical-section problem and illustrates some of the complexities involved in designing software that addresses the requirements of mutual exclusion, progress, and bounded waiting. Peterson's algorithm is considered a standard low-level algorithm for two-thread mutual exclusion.

P0 execution

P1 Trigger

Analysis of Peterson Algorithm approach