Oops! It appears that you have disabled your Javascript. In order for you to see this page as it is meant to appear, we ask that you please re-enable your Javascript!

Semaphores, counting semaphores, binary semaphores in Operating systems OS

Last modified on October 10th, 2018 at 2:00 pm

What are semaphores?

Semaphores are the variables.

Semaphores are used for signaling among processes.

Three kinds of operations are performed on semaphores;

  1. To initialize the semaphore
  2. To increment the semaphore value
  3. To decrement the semaphore value

What are binary semaphores?

Binary semaphores take only the values in between 0 to 1.

What are counting semaphores?

Counting semaphores have the non-negative integer value.

How can processes get the critical section?

  • A critical section is controlled by semaphores by following operations;
    • Wait:
      • Any process can’t enter into the critical section.
      • Semaphore value is decremented.
    • Signal:
      • The process can enter into the critical section.
      • Semaphore value is incremented.

 

difference between binary and counting semaphores

Prof. Fazal Rehman Shamil
Researcher, Publisher of International Journal Of Software Technology & Science ISSN: 2616-5325
Instructor, SEO Expert, Web Programmer and poet.
Feel free to contact.