what are the Proposals for Achieving Mutual Exclusion?, Basic Computer Science

Assignment Help:
Proposal a) Disabling Interrupts (Hardware Solution)
• Every process disables all interrupts just after entering in its critical section and re-enables all interrupts just previous to leaving critical section. With interrupts turned off the CPU could not be switched to further process. consequently, no other process will enter its critical and mutual exclusion get.
• Conclusion
Disabling interrupts is sometimes a useful interrupts is sometimes a useful technique within the kernel of an operating system, but it is not appropriate as a general mutual exclusion mechanism for users’ process. The reason is that it is unwise to give user process the power to exit interrupts.

Proposal b) Lock Variable (Software Solution)
• In this solution, we judge a single, shared, (lock) variable, at first 0. When a process desires to enter in its critical section, it first tests the lock. If lock is 0, the process at first sets it to 1 and then enters the critical section. If the lock is previously 1, the process just waits until (lock) variable becomes 0.Therefore, a 0 means that no process in its critical section, and 1 means hold your horses - some process is in its critical section.
Conclusion of problem
the error in this proposal can be best explained by illustration. Suppose process A sees that the lock is 0. Before it can put the lock to 1 one more process B is scheduled, runs, and sets the lock to 1. as the process A runs again, it will also set the lock to 1, and two processes will be in their critical section at the same time.

Proposal c) Strict Alteration
• In this proposed solution, the integer variable ''turn'' remains track of whose turn is to enter the critical section. Originally, process A inspect turn, finds it to be 0, and come in its critical section. Process B also gets it to be 0 and sits in a loop continually testing ''turn'' to see when it becomes 1.constantly testing a variable waiting for some value to come out is called the Busy-Waiting.
• Conclusion
taking turns is not a high-quality thought when one of the processes is much slower than the other. Suppose process 0 finishes its critical section quickly, so both processes are now in their noncritical part. This circumstance violates above mentioned condition 3.
by means of Systems calls ''sleep'' and ''wakeup''
• Essentially, what above mentioned solution do is this: when a process desires to enter in its critical section, it checks to see if then entry is permitted or not? If it is not, the process goes into stretched loop and waits (i.e., start busy waiting) until it is allowed to enter. This approach waste CPU-time.
• Now appear at some interprocess communication primitives is the pair of steep-wakeup.
• Sleep
o This is a system call that reasons the caller to block, that is, be suspended until any other process wakes it up.
• Wakeup
o This is a system call that wakes up the process.
Equally ''sleep'' and ''wakeup'' system calls have one parameter that stand for a memory address used to match up ''sleeps'' and ‘wakeups’.

Related Discussions:- what are the Proposals for Achieving Mutual Exclusion?

List two i/o virtualization methods, Question 1 List two I/O virtualizatio...

Question 1 List two I/O virtualization methods. Based on different features compare these two methods Question 2 Discuss three areas considered by organizations to secure the

Physics, . State laws of transverse vibrations in stretched strings. Explai...

. State laws of transverse vibrations in stretched strings. Explain how do you verify them using sonometer.

Write a long note on the types of charts, Question 1 Write a long note on ...

Question 1 Write a long note on the security features of Windows XP Question 2 Write a long note on computer peripherals, briefly describing some of the devices Question

GNF, what does it means

what does it means

Switching mechanisms , SWITCHING MECHANISMS: Switching mechanisms are ...

SWITCHING MECHANISMS: Switching mechanisms are techniques devised to send messages in many dinections at once and to ensure that these messages are received with a minimum of

Perverse software, Perverse software: Perverse software is a program w...

Perverse software: Perverse software is a program which causes hindrances in other programs execution in such a way resulting in modification or complete destruction of data w

Audio/video applications on network, AUDIO/VIDEO APPLICATIONS ON NETWORK ...

AUDIO/VIDEO APPLICATIONS ON NETWORK Clinical applications of a computer include recording of slit lamp images on a computer. These still images or even videos can be recorde

Data mining, Process of Data mining Data mining is an iterative process t...

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

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