Process Synchronization – III – Using atomic instructions to solve Critical Section Problem

In the previous post, we discussed why atomic instructions like test_and_set() and compare_and_swap() were needed. We also discussed two algorithms which satisfied the mutual exclusion requirement, but did not satisfy the bounded waiting requirement. In this post, we shall discuss an algorithm using test_and_set() which satisfies all the requirements listed Read More …

Process Synchronization – II (atomic operations)

Let us continue our discussion from the previous post, where we discussed a software solution to the Critical section problem. Here, we discuss about a simple hardware solution to the critical section problem, followed by a discussion on  atomic operations like test_and_set() and compare_and_swap().SYNCHRONIZATION HARDWARE Peterson’s solution → software based Read More …