what is Semaphore and explain with example?, Basic Computer Science

Description
A semaphore is a confined variable whose value can be accessed and changed only by the operations P and V and initialization operation known as ''Semaphoiinitislize''.
• Binary Semaphores can take for granted only the value 0 or the value 1 counting semaphores also described general semaphores can suppose only nonnegative values.

• The P (or wait or sleep or down) operation on semaphores S, assumed as P(S) or wait (S), controls as follows:
• P(S):

IF S > 0
THEN S := S - 1
ELSE (wait on S)

The V (or signal or wakeup or up) process on semaphore S, written as V(S) or signal (S), controls as follows:
V(S): IF (one or additional process are waiting on S)
THEN (let one of these processes proceed)
ELSE S := S +1

Posted Date: 5/2/2012 9:30:04 AM | Location : United States







Related Discussions:- what is Semaphore and explain with example?, Assignment Help, Ask Question on what is Semaphore and explain with example?, Get Answer, Expert's Help, what is Semaphore and explain with example? Discussions

Write discussion on what is Semaphore and explain with example?
Your posts are moderated
Related Questions
I am using block matching algorithm to get the motion vectors, now, how can I get the depth map/depth value from the motion vectors?

assignment of making a small database in C# with a back end support of MS Access. i required a form with following options : Enter a new user (user name, father name, age, d



Packet Switching: This is one of recent techniques of switching. Packet switching was originally developed for use by ARPA network by the Defence Department of US. According t

The following are required: Create a project in Access.  Your database must have flow and a theme. The database must be normalized.  The content m

The easiest way to approach pipelining is to regard as the three stage fetch, decode and execute instruction execution cycle outlined earlier. There are times during each of these

Characterizations of Artificial Intelligence Artificial Intelligence is a typical science to describe, because it has fuzzy borders with, psychology, computer science, mathemat

Digital to analogue conversion (dac): Since many systems used on aircraft will require outputs in analogue form, it will be necessary to be able to convert the digital informat

ATM Theory - Unspecified Bit Rate Is intended for non-real time applications, that is, those not requiring tightly constrained delay and delay variation. Examples of applications