What are semaphores, Computer Engineering

Assignment Help:

What are semaphores?

Semaphore: A semaphore is a synchronization tool which gives a general-purpose solution to controlling access to critical sections. It s an abstract data type (ADT) which defines a nonnegative integer variable that, apart from initialization, is accessed simply through two standard operations that are: wait and signal. The typical definition of wait in pseudo code is

wait(S){

          while(S<=0)

                 // do nothing

                          S--; }

The classical definitions of signal in pseudo code is signal(S){

                    S++; }

While one process modifies the semaphore value, anno one process can concurrently modify that similar semaphore value. As well, in the case of the wait(S), the testing of the integer value of S (i.e. S<=0), and its possible modification(S--), should also be executed without interruption.


Related Discussions:- What are semaphores

What are the characteristics of the e-cash, What are the characteristics of...

What are the characteristics of the E-Cash? These kinds of payments, turning the Internet within a transaction oriented forum, need mediums which are easy and cheap (through a

Find out data changing from special code to temporal code, Data can be chan...

Data can be changed from special code to temporal code by using ? Ans. By using Shift Registers data can be changed from special code to temporal code. A Register wherein data ge

Illustrate some notations of object modeling notations, Illustrate some not...

Illustrate some notations of object modeling notations A classifier is a mechanism which describes behavioural and structural features. In UML significant classifiers are cla

Illustration of cache size of a system, Q. Illustration of cache size of a ...

Q. Illustration of cache size of a system? Cache Size: Cache memory is very costly as compared to main memory and therefore its size is generally kept very small.  It has bee

., advantages and disadvantages of a header node

advantages and disadvantages of a header node

Can we specify the next screen number with a variable, Can we specify the n...

Can we specify the next screen number with a variable:- Yes, we can specify the next screen number with a variable.

What is hypercube network, Q. What is Hypercube Network? The hypercube ...

Q. What is Hypercube Network? The hypercube architecture has played a significant role in development of parallel processing and is quite influential and popular. The highly sy

What is a macro, What is a macro ? How it is defined ? Preprocessor' is...

What is a macro ? How it is defined ? Preprocessor' is a translation phase that is applied to  source code before the compiler  proper  gets  its  hands on  it.  Generally,  th

Padovan string , A Padovan string P(n) for a natural number n is defined as...

A Padovan string P(n) for a natural number n is defined as: P(0) = ‘X’ P(1) = ‘Y’ P(2) = ‘Z’ P(n) = P(n-2) + P(n-3), n>2 where + denotes string concatenation. For a string of t

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