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
#queswhat computers can do tion..

design a synchronous, recycling, MOD-12 counter with D FF''s. Use the states 0000 through 1011 in the counter.

whats the adaptation

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

Internet searching:  The Internet consists of millions of private/public/academic/business and government networks having local to global scope. It has billions of web pages o

ELEMENTS OF CPU: The CPU is a complex IC chip having millions of transistors. As mentioned earlier, a CPU has three major identifiable parts: Control Unit (CU), Arithmetic & l

Input unit: These are used to read data and transfer to primary memory contained in CPU through keyboard or floppy disk or mouse etc. Central Processing Unit (CPU): This consists o

Multiprocessor DSP Systems Over modern times several organizations have provided forums made up of several DSPs. More lately, semiconductor organizations have been providing sn

Task 1 Study various types of systems and simulate a system of your own. Task 2 Study various models and enumerate the various steps for designing a corporate model

Telecommunications network: "A telecommunications network, at its simplest, may be regarded as comprising a transmission network, an arrangement of transmission paths and swit