An Efficient Solution to the Mutual Exclusion Problem Using Weak Semaphores

نویسندگان

  • Stuart A. Friedberg
  • Gary L. Peterson
چکیده

We present a simple solution to the mutual exclusion problem with no lockout that uses weak binary semaphores. Previously, Morris [4] presented a solution to this problem that uses three binary semaphores and two variable-size shared variables. A simpler solution was given in [5], where just two semaphores and two shared singlebit variables are used. (In some earlier versions, an incorrect one-bit solution was given.) The algorithm given in this paper also uses two semaphores and two shared single-bit variables, but it solves an additional open problem by being correct even if the number of processes is unbounded but finite. (Morris uses the term 'finite' when 'bounde~l' is dearly meant.) The algorithm makes use of a form of semaphores we call 'weak'. The semantics of these semaphores is that if a process performs a V operation and some other process is waiting on that semaphore, then the first process is not allowed to immediately perform another P operation on that semaphore. Instead, one of the wait-

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

A Starvation-Free Solution to the Mutual Exclusion Problem

With three or more cyclic processes competing for the critical section, however, there is a danger of individual starvation when the Pand V-operations are so-called ‘weakly implemented’. When the semaphore operations are weakly implemented and a V(m) is executed, which process is allowed to proceed is left undefined when two or more processes are blocked by P(m). .As a result, there is a danger...

متن کامل

Solutions Based on Binary Semaphores

A graphical form of the mutual exclusion problem is considered in which each vertex represents a process and each edge represents a mutual exclusion constraint between the critical sections of the processes associated with its endpoints. An edge semaphore solution for mutual exclusion problems is defined, and those graphs which are edge solvable are characterized in terms of both a forbidden su...

متن کامل

Mutual exclusion revisited

A family of four mutual exclusion algorithms is presented. Its members vary from a simple three-bit linear wait mutual exclusion to the four-bit first-come firstserved algorithm immune to various faults. The algorithms are based on a scheme similar to the Morris’s solution of the mutual exclusion with three weak semaphores. The presented algorithms compare favorably with equivalent published mu...

متن کامل

How to solve the Santa Claus problem

John Trono published a new exercise in concurrent programming—the Santa Claus problem—and provided a solution based on semaphores [12]. His solution is incorrect because it assumes that a process released from waiting on a semaphore will necessarily be scheduled for execution. We give a simple solution in Ada 95 using higher order synchronization primitives: protected objects and rendezvous. We...

متن کامل

Using necessarily weak efficient solutions for solving a biobjective transportation problem with fuzzy objective functions coefficients

This paper considers a biobjective transportation problem with various fuzzy objective functions coefficients. Fuzzy coefficients can be of different types such as triangular, trapezoidal, (semi) $L-R$, or flat (semi) $L-R$ fuzzy numbers. First, we convert the problem to a parametric interval biobjective transportation problem using $gamma$-cuts of fuzzy coefficients. Then, we consider a fix $g...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:
  • Inf. Process. Lett.

دوره 25  شماره 

صفحات  -

تاریخ انتشار 1987