Explain a binary semaphore, Computer Engineering

Assignment Help:

Explain a binary semaphore with the help of an example?

An abstract data type (ADT) is a semaphore which defines a nonnegative integer variable that apart from initialization is accessed only by two standard operations i.e.: wait and signal. The typical definition of wait in pseudo code is given as

wait(S){

      while(S<=0)

    ; // not do anything

          S--;

          }

      The classical definitions of signal in pseudocode is signal(S){

          S++;

       }

A  binary  semaphore  is  one  which  only  gets  the  values  0  and  1.  Such semaphores are utilized to implement mutual exclusion.


Related Discussions:- Explain a binary semaphore

Benefit of digital versatile disk read only memory, Q. Benefit of digital v...

Q. Benefit of digital versatile disk read only memory? The main benefit of having CAV is that individual blocks of data can be accessed at semi-random mode. So head can be move

Reprographic technologies, Reprography: Reprography, as a term, has ga...

Reprography: Reprography, as a term, has gained international recognition in 1963. It includes "photocopying , microcopying, duplicating and in-plant printing and is character

calculates the area and perimeter of a rectangle, Write a program, using f...

Write a program, using functions, that calculates the area and perimeter of a rectangle whose dimensions (Length & width) are given by a user.

Define interrupt processing, Q. Define Interrupt Processing? On complet...

Q. Define Interrupt Processing? On completion of execution of an instruction machine checks whether there is any pending interrupt request for interrupts which are enabled. If

Determine the output waveforms for and and or gates, The voltage waveforms ...

The voltage waveforms shown in given fig. are applied at the inputs of 2-input AND and OR gates. Determine the output waveforms. Ans. The Output waveforms for AND and O

Data structures.., in asingle function declaration what is maximum no of st...

in asingle function declaration what is maximum no of statements that may be recursive calls

Hypertext vs hypermedia, Hypertext vs Hypermedia     Hypertext is basic...

Hypertext vs Hypermedia     Hypertext is basically the similar as regular text - it can be stored, read, searched, or edited - with a significant exception: hypertext having co

Shell script, shell script to find whether the given number is Armstrong or...

shell script to find whether the given number is Armstrong or not

In ldb what determines hierarchy of the tables, In LDB what determines hier...

In LDB what determines hierarchy of the tables? Structure

What are the advantages and disadvantages of a smart card, What are the adv...

What are the advantages and disadvantages of a Smart Card?    Advantages of Smart Card: 1. It gives convenience & support for multiple currencies over borders. 2. Used

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd