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

What are the disadvantages of linux, What are the disadvantages of Linux? ...

What are the disadvantages of Linux? Learning Lack of comparable programs More technical skill required

Isoquants, what are the types of isoquants

what are the types of isoquants

Data reader by returned from a web services, Why can not data reader by ret...

Why can not data reader by returned from a Web Services Method? Ans) Due to, it is not serializable

What are the disadvantages of a smart card, What are the disadvantages of a...

What are the disadvantages of a Smart Card? Disadvantages of Smart Cards are as follows: a. The value of money can be depleted and recharged. b. Customers should keep

Btree, What should the size of ''t'' in btree be depending on the hard disk...

What should the size of ''t'' in btree be depending on the hard disk size

System programming, concurrentisation and vectorisation of program

concurrentisation and vectorisation of program

Delete the leaves of a binary tree, Write a recursive algorithm to delete t...

Write a recursive algorithm to delete the leaves of a binary tree. Programming Requirements You must use the binary search tree code provided.  Each algorithm must be impleme

What do you mean by digital computer, COMPUTER ORGANIZATION & ARCHITECTURE ...

COMPUTER ORGANIZATION & ARCHITECTURE 1. What do you mean by digital computer? Explain the block diagram of a digital computer. 2. What do you mean by Difference Engine? Expl

What are limitations of assembly language, What are limitations of assembly...

What are limitations of assembly language? i. It is changed to machine language using assembler which is time consuming when compared with machine language. ii. It is comple

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