Already have an account? Get multiple benefits of using own account!
Login in your account..!
Remember me
Don't have an account? Create your account in less than a minutes,
Forgot password? how can I recover my password now!
Enter right registered email to receive password!
Write a note on semaphores
A semaphore is a tool meant for synchronizing multiple processes trying to access a shared variable. That is a semaphore is used to deal with the critical section problem or in other words to evade the race condition. A semaphore S is in fact an integer variable that apart from initialization is accessed only through two standard atomic operations:
*Wait and signal.
The traditional definition of wait in pseudo code is:
wait (S) {
while (S<=0)
; // no-op
S--;
}
The traditional definition of signal in pseudo code is:
signal (S) {
S++;
For each process P,
do {
WAIT
Critical Section
SIGNALS
} while (1);
A semaphore is able to be defined as:
typedef struct {
int value;
struct process *L;
} semphore;
Once more, the wait semaphore operation can be defined as:
void wait (semaphore S) {
S.value--;
if (S.value < 0) {
add this process to S.L;
block();
As well, the signal semaphore operation is able to be defined as:
void signal( semaphore S) {
S.value++;
if (S.value <= 0) {
remove a process P from S.L;
wakeup(P);
Q. Discuss the advantages as well as disadvantages of caching name translations for computers located in remote domains. Answer: There is a performance benefit to caching nam
Define secondary memory. This memory holds those pages that are not there in main memory. The secondary memory is usually a high speed disk. It is called as the swap device, an
#questionThe Fibonacci sequence is the series of numbers 0,1,1,2,3,5,8,… Formally, it can be expressed as: fib0 = 0 fib1 = 1 fibn = fib n-1 + fib n-2 Write a C program u
define semaphore. how can we use semaphore to deal with n-process critical section problem.
Give a brief introduction about the operation of your program and show that you understand the idea behind threads and mutual exclusion variable. Why do we need to use mutual exclu
What does Verification represent? Verification shows the set of activities that are carried out to confirm that the software correctly executes the specific functionality.
MEMORY MANAGEMENT USING BUDDY SUSTEM Here we are dividing the memory as powers of two as well as we are selecting the space which is smallest but large enough to hold a process
Briefly explain process management in Windows 2000. The Windows 2000 process manager provides for deleting, creating and using threads and processes. It has no knowledge about
Step by step displays the content, and the final result of the list ("buffer") of 6 elements as the initial values ??and the following elements which are produced (NEXTP) or consum
time-stamping It is a method proposed by Lamport, used to sequencing events in a distributed machine without the use of clocks. This process is intended to order events consis
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!
whatsapp: +91-977-207-8620
Phone: +91-977-207-8620
Email: [email protected]
All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd