Process Synchronization – IX – Dining Philosophers Problem

In the previous post, we discussed the Reader-Writers Problem, which is one of the classical problems of synchronization.  In this post, we shall discuss the Dining Philosophers problem (first proposed by EW Dijkstra), which is a simple representation of a large class of concurrency-control problems. In these types of problems, Read More …

Process Synchronization – VIII – Readers-Writers Problem

In the previous post, we discussed the Bounded buffer problem. Let us now discuss the Readers-Writers problem, which is another interesting process synchronization problem. These classical synchronization problems are used to test nearly every new synchronization primitive. Problem Statement Let us imagine a system where several processes are executing concurrently. Read More …

Process Synchronization – VII – Bounded Buffer Problem

In the previous posts, we have discussed several aspects of process synchronization, which includes discussing a solution of the bounded buffer problem. In this post, we shall discuss a solution to the bounded-buffer problem using semaphores. THE BOUNDED-BUFFER PROBLEM In our first post on process synchronization, we had discussed the Read More …

Process Synchronization – VI – Priority Inversion

In the previous post, we discussed the implementation of semaphores without busy waiting. In this post, let us cover an interesting topic of Priority inversion. What exactly is priority inversion? Priority inversion is a problem which occurs while scheduling tasks. The meaning of Priority inversion can be understood from the Read More …

Process Synchronization – V –Implementing Semaphore without busy waiting

In the previous post, we discussed about mutex locks and semaphores and the differences between them. We also discussed how mutex implementations and the sempahore implementations (using wait() and signal() ) discussed previously suffered from busy waiting, which entails doing a lot of unnecessary work. Let us now discuss implementing Read More …

Process Synchronization – IV – Mutex and Semaphores

In the previous post, we discussed a solution to the Critical Section problem using test_and_set() atomic instruction which satisfied all the three requirements mandated for a correct solution. In this post, we shall start with software-based solutions designed to solve the critical section problem. This is necessary, because hardware-based solutions Read More …

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 Concept – I – Introduction to Processes

In this post, we first get to know what a process is. This will be followed by a discussion on process states. We will get to know about Process Control block, Process Scheduling using Scheduling queues. Discussion on types of schedulers (Short term, medium term and long term). Finally, we Read More …