Literature Review on Inter-Process Communication and Synchronization Problems
Cyril John A. Yaranon
Institute of Computing, University of Southeastern Philippines, Iñigo St. Obrero, Davao City, Philippines
I. Introduction
This paper will tackle various classical Inter-process Communication and synchronization problems that have been the problem of Operating Systems. Some problems that will be tackled in this paper are Dining Philosophers problem, Producer-Consumer problem, and Readers and Writers problem. This paper will also try to tackle different solutions that have been tried in order to solve these problems.
II. Discussion
a. The dining philosopher’s problem states two issues: deadlock and livelock. This problem is often narrated as
…show more content…
To try to solve this issue we may try to put a time limit to each philosopher when they are holding a fork, for example we say three minutes. After three minutes of holding a fork if a philosopher cannot obtain a second fork he gives up the fork in his hand. In this proposed solution another problem arises; livelock. Livelock will occur if all the philosophers do these set of actions at the same exact time. No deadlock but the occurrence of livelock is clear and present. Another proposed solution is resource hierarchy in which the forks are the resources and they are numbered. Now the rule for each philosopher is to pick the lower numbered fork first. The philosopher near the largest numbered fork cannot pick up that fork unless one of them has one of the lower numbered fork. This leaves exactly one happy philosopher with two forks in his hand and so he can eat while the other philosophers wait until he puts down his forks. But this solution of resource hierarchy is slow thus another simpler solution is hereby proposed; semaphores. Suppose we limit the number of philosophers that can access the table to be