My codes to illustrate what I learn from dinosaur book (Operating System Concepts)
Package com.tamco.synchronization is some illustration about process synchronization. Peterson solution is a software solution to synchronization problem. But it is complex and not useful in modern computer architecture. Fortunately most of architectures now provide special instructions such as test_and_set , compare_and_swap that are un-interruptable (meaning atomically). We can use them to solve synchronization problem.