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 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 …

Process Concept – IV

INTER-PROCESS COMMUNICATION (IPC)Continuing our discussion from the previous post, we discuss Inter-Process Communication in this post. This is followed by a discussion on Shared memory systems and message passing systems. Different ways of message passing, which include direct/indirect communication, synchronous and asynchronous communication, and automatic/explicit buffering are also discussed. Why do Read More …

Process Concept – III – Process Termination

PROCESS TERMINATION Continuing our discussion from the previous post, we discuss the topic of process termination here. This post discusses the normal sequence of events for process termination, along with some interesting types of processes which include zombie process, orphans and daemons.How does a process terminate? Process termination occurs in Read More …