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
Process of Data mining Data mining is an iterative process that typically involves the following phases: Problem definition A data mining project starts with the understanding o

Analogue and digital signals: Analogue (continuous) information is made available in virtually all aircraft equipment.  Figure 1 shows the analogue signal created by a variable

can you help me convert binary into decimals?

QUESTION (i) Write short notes on each of the following: a) Shelf reading b) Joint Fiction Reserve c) London and South-Eastern Library Region d) Document access

Question 1 How PHP works? Explain the structure of PHP Question 2 Write a note on links and webs Question 3 Explain why do you need Document Type Definition (DTD)?


The three main elements of the control unit are: 1. Decoder this is used to decode the instructions that create a program when they are being processed, and to establish in what ac

Paper System : When setting up a computer system you need to ask yourself 'Does the system you plan to operate work manually, i.e., on paper?' It is a popular misconception that t

Trap doors:  This is a way of bypassing normal authentication procedure (windows/ operating system user name  and password) to access a system. Once a system is compromised (impac

SOFTWARE BASICS: Software is a generic term covering the concepts, procedures and instructions which cause the computer systems to accomplish the required job, Generally, soft