Exercises M1 and M2
- M1: Using the test and set lock (TSL) instruction, modify
the "busy-waiting" semaphores presented in class so that mutual
exclusion of the semaphore counter "s" is guaranteed.
- M2: Mutual exclusion with the TSL instruction as described in
class does not guarantee bounded waiting. Find a solution to the
critical section problem using the TSL instruction that guarantees
bounded waiting. That is, find a solution that guarantees that
given N processes, a processes is bypassed no more than N-1 times
before it enters the critical section.