Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

During the implementation of its new and improved back-office operating system,

ID: 3765053 • Letter: D

Question

During the implementation of its new and improved back-office operating system, XSI Inc. finds that the XSI OS lacks mechanisms for the ordered acquisition of synchronization objects. The result is that its web servers are periodically locking up. Systems administrators are perplexed because the systems show all processes are active using the [ps -ef] command except for the web server process, which appears to be waiting in a call to pthread_mutex_lock(). When they reboot the servers, the problem disappears until the servers get busy and the lock-up occurs again. The business impact of this problem is that XSI customers are unable to access the website to make purchases during peak periods. Recommend a deadlock avoidance approach most suitable for the XSI web server application that is not using an ordered acquisition of mutexes.

Explanation / Answer

Answer :

The solution to avoid deadlock by only granting resources if granting them cannot result in a deadlock situation later. This works only if the system knows what requests for resources a process will be making in the future, and this is an unrealistic assumption. Deadlock avoidance refers to a strategy where whenever a resource is requested, it is only granted if it cannot result in deadlock. And deadlock prevention is plan to involve changing the rules so that processes will not make requests that could result in deadlock. The below plan is conceptually easy but often hard to implement in practice because it assumes that a process knows what resources it will need in advance.The alternative plan is to require all processes to request all of their resources at once, and either all are granted or none are granted.

We can also avoid deadlocks by making use prior knowledge about the usage of resources by web servers including resources available, resources allocated, future requests and future releases by web servers . Most deadlock avoidance algorithms need every web server to tell in advance the maximum number of resources of each type that it may need. Based on all these info we may decide if a process should wait for a resource or not, and thus avoid chances for circular wait.If a system is in a safe state, we can try to stay away from an unsafe state and avoid deadlock and deadlocks cannot be avoided in an unsafe state.

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote