A Simpler Solution: Peterson's Algorithm
This is a much simpler algorithm developed by Peterson. In a remarkable 1981 paper
of less than two pages, Peterson developed and proved versions of his algorithm for
both the 2-process case and the N-process case.
Visual Basic Examples: Employee Payroll
In this example, we will calculate the overtime worked by an employee of a company. To do this, we
will consider each week day with 8 regular hours. If an employee works more than 8 hours in one