Question

In: Computer Science

A critical section problem can be solved by satisfying which of the following condition, a. Mutual...

A critical section problem can be solved by satisfying which of the following condition,
a. Mutual Exclusion
b. Progress
c. Bounded Waiting
d. All of the mentioned

Give a logical reason with an example for it why and how you selected it?

Solutions

Expert Solution

The answer is d. All of the mentioned

A proper solution of critical section problem must satisfy all the three condition of mutual exclusion, progress and bounded waiting.

Mutual exclusion means that when a process enters critrical section no other process should be allowed to enter critical section at that time. example if process p1 is running in critical section then another process p2 that wants to enter critical section will have to wait until p1 is finished executing. If mutual exclution is violated there might arise race conditon and we might not get proper output.

Progress means that when a process is not entering its critical section it must not stop other process from entering it. example suppose there are three process p1, p2 and p3. If p1 here doesn't want to enter critical section it must stop p2 and p3 from entering it. The same goes for p2 and p3 as well.

Bounded waiting means that when a process is running in critical section it must not make another process wait for a long time. There is a limit to the amount of request processes make. example if there are 100 processes and the limit for request is 50, so now if process 1 is in critical section and other processes are requesting to enter their critical section then the limit for stacking up requests will be 50 after which process 2's request must be granted.


Related Solutions

Question Four Explain Peterson’s solution for critical-section problem and show that mutual exclusion is preserved with...
Question Four Explain Peterson’s solution for critical-section problem and show that mutual exclusion is preserved with Peterson’s solution. (Assume there are only two processes P0 and P1)
. Is the following software solution to the critical section problem correct?                      {          &nbsp
. Is the following software solution to the critical section problem correct?                      {              int   lock = 0;                ………….                if (lock == 0) then lock = 1                 else                         while (lock == 1) no-op;                   enter_CS;                          CS                    exit_CS;                 ……….             }
1. A black hole is any object satisfying the following condition a) the mass of the...
1. A black hole is any object satisfying the following condition a) the mass of the object is greater than about 20 solar masses b) the radius of the object is less than its schwarchild radius c) the speed of the object is greater than the speed of light 2. A galactic rotation curve displays a) angle as a function of time b) velocity as a function of angle c) velocity as a function of distance 3. A pulsar believed...
How could an assignment problem be solved using the transportation approach? What condition will make the...
How could an assignment problem be solved using the transportation approach? What condition will make the solution to this problem difficult? Please give a typed answer and focus on the second part of the question.
oase Theorem suggests one way in which the problem of externalities can be solved. However, the...
oase Theorem suggests one way in which the problem of externalities can be solved. However, the theorem has its practical limitations. From the scenarios given below, which is the best candidate for Coase-like solution? Paul is annoyed by the loud music played by his neighbor. Manufacturing plants in the Midwest emit sulfur dioxide which causes acid rain in Canada. Carbon emissions from coal power plants in China contribute to climate change of the planet. All of the above are equally...
Provide a solution to this problem. Any ideas on how it can be solved.   Comprehensive problem...
Provide a solution to this problem. Any ideas on how it can be solved.   Comprehensive problem (discussion board): •        Current Accounts –       2009: CA = $4,400; CL = $1,500 –       2008: CA = $3,500; CL = $1,200 •        Fixed Assets and Depreciation –       2009: NFA = $3,400; 2008: NFA = $3,100 –       Depreciation Expense = $400 •        Long-term Debt and Equity –       2009: LTD = $4,000; Common stock = $500 –       2008: LTD = $3,950; Common stock = $400 •        Income Statement –       EBIT = $2,000; Taxes = $300 –       Interest Expense...
problem that can be solved by one or more of gene manipulation techniques for example PCR
problem that can be solved by one or more of gene manipulation techniques for example PCR
Provide a story problem that can be solved using one or more of the TVM calculations.
Provide a story problem that can be solved using one or more of the TVM calculations.
public finance What is free rider problem and how can it be solved. Discuss.
public finance What is free rider problem and how can it be solved. Discuss.
4.1) What three conditions must be satisfied in order to solve the critical section problem and...
4.1) What three conditions must be satisfied in order to solve the critical section problem and why? 4.2) Please answer each of the following questions briefly: a)   What is deadlock avoidance? (2 points) b)   What is deadlock prevention? (2 points) c)   Please discuss a strategy for deadlock avoidance (3 points) d)   Please discuss a strategy for deadlock prevention (3 points) 5. (Chapter 6) Please answer the following questions briefly (5 points each, total 10 points) 5.1) Explain the process of...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT