This program creates as many threads as system’s CPUs to print all numbers between 0 and 20. It reassures mutual exclusion between running threads. Mutual exclusion methods are implemented with four different algorithms (boolean variable, switching, Petterson’s algorithm, Bakery algorithm).