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

ELECTRONIC EDUCATIONAL RESOURCES: In the present era, you can get access to a large number of electronic educational resources through the web. These resources may be on diffe

Gareth's Gardens is a small firm that specialises in planning and laying new gardens.  A particularly popular garden plan consists of a patio and lawn, together with a circular pon

Web Browser:   A Web browser is software application that enables you to find, retrieve, and display information available on the World Wide Web (WWW). Browser also allows you

true or false-- most designs of a desktop publishing document needs to follow clear, specific rules pertaining to design


Hello, Could you create a linux calculator using very basic java code (not complex, because I am a novice java coder). It should be called into the terminal for interaction. Thank

A tuple is one more series data type that is like to the list. A tuple consists of a number of values divided by commas. Not like lists, though, tuples are enclosed inside parenthe

It would not emerge practical to type an entire program each time it is required, and to avoid this it is possible to store a program on the disk, with the vast advantage that by b

What is CAI? Explain its pitfalls