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

Explain deadlock detection and recovery, Deadlock Detection and Recovery ...

Deadlock Detection and Recovery It's a method of permitting the system to enter a deadlock state, detect it and then recover. Deadlock detection : Is the process of

Explain the basic method of paging method, Explain the basic method of pagi...

Explain the basic method of paging method. Physical memory is divided into the fixed-sized blocks called frames. Logical memory is as well divided into blocks of the same size

Explain virtual file systems, Virtual file systems The file-system exec...

Virtual file systems The file-system execution having of three major layers. The first layer is the file-system interface, based on the open, read, write and close calls and fi

Define lru page replacement algorithm, Define LRU Page Replacement Algorith...

Define LRU Page Replacement Algorithm LRU policy: LRU expands to least currently use. This policy suggests which we re- move a page whose last usage is farthest from current ti

Dual mode operation, WHAT ARE THE ADVANTAGES AND DISADVANTAGES OF DUAL MODE...

WHAT ARE THE ADVANTAGES AND DISADVANTAGES OF DUAL MODE OPERATION OF OPERATING SYSTEM>?

WINDOWS XP, DESIGN GOALS OF WINDOWS XP.DESCRIBE IN DETAIL.

DESIGN GOALS OF WINDOWS XP.DESCRIBE IN DETAIL.

Explaintable management techniques, Discuss in detail Table management Tech...

Discuss in detail Table management Techniques?     An Assembler employs the subsequent tables: OPTAB: Operation Code Table consists of mnemonic operation code and its machi

Activities of operating system - memory management, Q. What are the three m...

Q. What are the three main activities of an operating system in regard to memory management? Answer: a. Keep follows of which parts of memory are currently being used and

What is dispatcher? explain, Questiion 1 What is RTOS? What are its requir...

Questiion 1 What is RTOS? What are its requirements? Questiion 2 Explain the structural elements of a real time system mode Questiion 3 What is kernel? Explain abo

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