Question

In: Computer Science

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 starvation and how aging can be used to prevent it.

5.2)

What effect does the size of the time quantum have on the performance of an RR algorithm?

Refer to Operating System Concepts Essentials, 2nd Edition

Solutions

Expert Solution

4.1)The three conditions that are satisfied in order to solve critical section problem are:

  )Mutual Exclusion:if one process executes in critical section, no other process are allowed to execute in the critical section.

  )Progress:if no process is executing in the critical section and the other processes are waiting outside the critical section in order to enter the critical section ,then only those processes that are not execute the remainder critical section can participate that will enter the next.

  )Bounded Waiting:it implies that there exists a bound on the number of times a process is taken to enter  the critical section there after the process has made any request to enter the critical section and before the request is granted.

In order to synchronize the cooperative processes,we must do solving of critical section.we must solve the critical section problem in such a way by giving solution which satisfies the above three requirements.These are the three major requirements for synchronization mechanisms.   

4.2)

In Operating Systems,Deadlock is a process or a situation in where a set of processes are blocked because each process is holding a resource and it is waiting for another resource acquired by the other processes.

a)Deadlock avoidance:

  It is a process of avoiding deadlock,and it does not totally prevent deadlock.

  It ensures that system does not go in unsafe state.

In this Resource requests are done according to the available safe path.

  It requires the entire information about the existing resources,the available resources,and the resource requests.

  In this,request checks are automatically considered and it will check whether it is safe for the system or not.

b)Deadlock prevention:

It blocks at least one of the conditions which are necessary for the occurrence of deadlock.

In this all the resources are requested together.

It does not require any information about the existing resource,the available resources,and the resource requests.

It prevents deadlock by constraining request of resource and handling of resources.

  c)Deadlock avoidance strategy:

Must specify a maximum claim.

By knowing all future requests and releasing all the requests is a difficult process.

By estimating maximum demand for resources of each process is a easier procedure to produce.

In distributed Real Time Embedded Systems ,Deadlock occurs.

Thus a occurrence of deadlock avoidance also happens.

d)Deadlock prevention strategy:

For service oriented transaction processing an efficient deadlock prevention is needed.

  The reliability of business applications can be guaranteed by transaction processing.

In distribution management,locking resources are widely used to keep the system consistent.

It results in various deadlocks.

It will leads to deadlock prevention also.

5)

5.1)Starvation:

In operating system,like deadlock another problem also occurs. It is STARVATION.

It is a problem that occur in high priority processes which keep executing and low priority processes keeps blocked.

In this,resources are continuously utilized by high priority processes.

The priorities are assigned to the processes.

Starvation can be prevented by Aging.

Prevention of starvation by Aging:

Aging is a scheduling technique for preventing starvation.

In this,the gradually increasing of the priority processes that wait in the system for a long time.

In Aging,after some fixed amount of time quantum,the increasing of priority of low priority processes occurs.

By doing aging,as time passes,the lower priority process becomes higher priority process.

Thus we can allocate CPU for it.

5.2)Effect of size of the time quantum on performance of RR algorithm:

The scheduling of the process is one of the most important tasks on operating system.

Round Robin (RR) algorithm is one of the scheduling algorithm used by most of the operating systems.

In this,the ready processes are waiting in the ready queue,which seize the processor for a short period of time ,which is called as TIME QUANTUM.

If the time quantum is extremely large,The policy of the ROUND ROBIN (RR) algorithm is same as the policy of FIRST COME FIRST SERVE (FCFS) algorithm.

If the time quantum is extremely small,the approach behind RR algorithm which is called as process sharing,that leads in creating the appearance of each  n processor which has its own processor running at 1/n time the speed of real time processor.

  


Related Solutions

LAB: The purpose of this experiment is to study the conditions that must be satisfied for...
LAB: The purpose of this experiment is to study the conditions that must be satisfied for a rigid object to be in static equilibrium. This is done by computing the total torque acting on a meter stick by means of weights suspended at specific locations on the ruler. If a baseball bat (thicker on one side than the other) is cut at the location where it balances, with both side be of equal weight? Can the meter stick be balanced...
For a unique solution to the wave equation, what boundary conditions must be satisfied. a) Boundary...
For a unique solution to the wave equation, what boundary conditions must be satisfied. a) Boundary conditions are not needed for a medium with no interfaces. b) This is a trick question; all boundary conditions must be satisfied. c) The tangential boundary conditions d) The normal boundary conditions e) Continuity in solution across the boundary must be satisfied. T F (1)The loss tangent is related to the ratio of the conduction current density to the convection current density in the...
A polyhedron must meet three conditions in order to be regular: All of the faces are...
A polyhedron must meet three conditions in order to be regular: All of the faces are regular polygons; All of the faces are congruent (identical); All of the vertex points/arrangements are congruent (identical). Try to find three nonregular polyhedra, each of which violates a different one of these conditions. In other words, one of them should meet (1) and (2) but not (3); one should meet (1) and (3), but not (2); one should meet (2) and (3) but not...
To use a normal distribution in this scenario, which of the following conditions must be satisfied?
2020 Election ~ Bernie Sanders is a popular presidential candidate among university students for the 2020 presidential election. Leading into Michigan’s presidential primary election in 2020, a journalist, Lauren, took a random sample of 12133 university students and found that 9674 of them support Bernie Sanders. Using this data, Lauren wants to estimate the actual proportion of university students who support Bernie Sanders.We want to use statistical inference to estimate the actual proportion of university students who support Bernie Sanders.To...
Which of the following conditions must be satisfied by a successful price discrimination scheme? Select one:...
Which of the following conditions must be satisfied by a successful price discrimination scheme? Select one: a. The seller must be able to identify each customer as having a high or low value. b. The seller must be able to prevent arbitrage between the two groups. c. None of the above
What are the three conditions that must be proven for an auditor to be found negligent...
What are the three conditions that must be proven for an auditor to be found negligent under tort law? Based on a review of the legal cases, which conditions appear to be most difficult to prove? Please indicate the legal cases that set the precedents.
1.Please explain what requirements must be satisfied in order to receive nontaxable exchange treatment under § 1031...
1.Please explain what requirements must be satisfied in order to receive nontaxable exchange treatment under § 1031   2.Please explain the relationship between realized gain and boot received in a § 1031 like-kind exchange   3.Please explain the relationship between the postponement of realized gain under § 1031 (like-kind exchanges) and the adjusted basis and holding period for the replacement property   4.Please explain under what circumstance is there recognition of some or all of the realized gain associated with the...
In a perfectly competitive market, there are two conditions that must be met in order for...
In a perfectly competitive market, there are two conditions that must be met in order for there to be an equilibrium. Identify both. This is not a long essay - be concise and specific.
What conditions must be true about a weak acid solution in order to use the Henderson‐Hasselbalch...
What conditions must be true about a weak acid solution in order to use the Henderson‐Hasselbalch equation to find solution pH and in what region of a titration curve do these conditions exist?
Problem: Each student must create and solve an apportionment problem using what you have learned in...
Problem: Each student must create and solve an apportionment problem using what you have learned in this chapter. The problem must have at least four "states" and 30 "seats". You must choose one of the four methods presented in this chapter (Hamilton's, Jefferson's, Adams' or Webster's) to apportion the "seats". If you use Hamilton's Method, you must go on to demonstrate the occurrence of one of the paradoxes (Alabama, Population, or New States). If you use one of the divisor...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT