Write a note on the usage of semaphores, Operating System

Assignment Help:

Write a note on the usage of semaphores.

Semaphore is a synchronization tool and it is a variable having integer values. It is accessed only by two standard atomic operations wait and signal. These operation were initially termed p(for wait) and v(for signal).

                The traditional definition for wait in pseudocode is:

 

                             wait(s)  {

                                         while(s<=0)

                                           ;//no-op

                                         s--;

                                          }

             The traditional definition for signal in pseudo code is:

 

                            signal(s) {

                                             s++;

                                           }

Alteration to the integer value of the semaphore in the wait and signal operations should be executed indivisibly. i.e., when one process alters the semaphore value .No other process is able to simultaneously modify that same semaphore value. Additionally in the case of wait(s) the testing of the integer value of s (s<=0) and its possible modification (s--) must as well be executed without interruption.


Related Discussions:- Write a note on the usage of semaphores

Designing issues in a network -transparency, Transparency Users mus...

Transparency Users must be able to access remote resources as though these resources were local. Transparency should as well promote user mobility. Users must be allowed

Explain load balancing client server components, Explain Load Balancing Cli...

Explain Load Balancing Client Server Components When migration functionality from the client - only model to the client - server model, care must be taken not over-or underutil

Define latency plus seek time, Define Latency plus seek time The total...

Define Latency plus seek time The total time to arrange a disk drive mechanism for a block of data to be read from is its Latency plus seeks time

Define deadlock prevention, Define deadlock prevention. Deadlock preve...

Define deadlock prevention. Deadlock prevention is a set of process for ensuring that at least one of the four essential conditions like mutual exclusion, hold and wait, no pr

Unix and linux commands, To explore the UNIX file system, use basic UNIX co...

To explore the UNIX file system, use basic UNIX commands and use a text editor. Task:   1.      Logon to Linux. 2.      Create a directory "Unix" under your home d

Explain the reasons why an organisation fail to plan, Problem 1: (a) Wh...

Problem 1: (a) What are the likely benefits which an organisation may derive from the planning process? (b) Explain the main reasons why an organisation may fail to plan.

Explain about paging, Explain about paging? Answer: Paging is a memory-...

Explain about paging? Answer: Paging is a memory-management scheme that permits the physical-address space of process to be noncontiguous. Paging avoids the considerable proble

Explain kernel-level threads (klt), KERNEL-LEVEL THREADS (KLT) In this...

KERNEL-LEVEL THREADS (KLT) In this level every thread management is done by kernel .No thread library except an API system calls to the kernel thread facility exists. The kern

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd