
11.12 R4000 Processor Synchronization Support

In the test-and-set method, only one processor at a time is permitted to enter the critical section. Using a counter, up to N processors are allowed to concurrently execute the critical section. All processors after the Nth processor must wait until one of the N processors exits the critical section and a space becomes available.
The counter works by not allowing more than one processor to modify it at any given time. Conceptually, the counter can be viewed as a variable that counts the number of limited resources (for example, the number of processes, or software licenses, etc.). Figure 11-17 shows this process.
Figure 11-17 Synchronization Using a Counter





Generated with CERN WebMaker
![]()