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
Output devices: One of the most important output devices in computer system is its screen commonly called monitor. It is an output device and displays all the programs and app

i don''t understand how to create a program using double, int, float, short etc

i have an android app which uses a database file called question db which is stored in the assets file. I have tried a database example called android application development but f

QUESTION (a) Define z-transform of sequence x[n]. (b) A causal LTI system has impulse response h[n], for which the z-transform is                     H(z) = (1+z -1

Where can I get free software for drawing K maps


HARDWARE BASICS In the foregoing section of this Unit, an attempt has been made to explain to you the historic perspective relating to the development of computer from its ear

They are used to reduce or enlarge the content of the counters. DEC INC DEC INSTRUCTION Idea: To diminish the operator. Syntax: DEC destiny This action subtracts 1 from the destiny

Definition of  Algorithm  An algorithm is a design or plan of obtaining a solution to a problem. The solution is presented by listing all steps in which they are carried out.

1.Add a Validation Rule for Date of Birth so no one under the age of 18 can be added to the table. Hint: subtract the DOB from today''s date and divide by 365.25 (watch the parenth