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

Programming Assignment CS252 Spring 2014 Write an ARM assembly language subroutine that performs according to the following specification (Caesar cypher). Given a mixed case al

PROGRAMMABLE ROM (PROM): The user can program a PROM after purchase.  Each memory bit element in the PROM contains a nichrome or silicon link that acts as a fuse.  The user can

SMA* Search-Artificial intelligence IDA* search is good from a memory point of view. actually it may  be criticised for not using enough memory - utilizing  more memory may inc

Bootstrap loader: The critical programs are loaded into memory by the bootstrap loader at start-up time and will remain resident as long as the computer is running. The bootst

implement your own hashset

Search strategy-artificial intelligence: Soundness: You  can hear  in  some  application domains  -  i.e.  automated  theorem proving - that a search is "sound and complet

Problem 1. Obtain the set of prime implicants for f = Σ m (0,1,6,7,8,9,13,14,15) . Obtaining the set of prime implicants: 2. Draw the logic diagram of a divide by


Question 1 Explain Tropospheric Refraction Question 2 Write a note on DECT Question 3 Explain mobile integrated radio systems (MIRS) Question 4 What are ap