Peterson's Algorithm Homework

Section 2.3.3 of the textbook describes Peterson's algorithm, and shows code for implementing the algorithm with two processes.

Please devise a version of the code that works with N processes, where N is a parameter > 2. You may write the code in C, Java, C++, Python, Perl, Basic, or write pseudo-code.

(10 point homework assignment.)