Deadlocks Platform Technology
Deadlocks Platform Technology
-There are two processes, P and Q, compete for resources A and B. One resource can only be accessed
by one process at a time. Process Q acquires and retains Resource A while awaiting the arrival of
Resource B, Process P acquires and holds Resource B.
2.) What do you think would happen if both Process P and Q need to get the same resource?
-Processes acquire resource units and then make them accessible for use by other processes. Reusable
resources include things like I/O channels, CPUs, primary and secondary memory, hardware, and data
structures like files, databases, and semaphores. Because neither party will be able to use the same
resource at the same time, there will be starvation and a stalemate.
3.) Which concurrency mechanism would you suggest that might prevent the deadlock situation above?
Rationalize your answer.
-Circular wait because this ensures that not a single process can request a resource which is being
utilized by some other process and no cycle will be formed. Among all the methods, violating Circular
wait is the only approach that can be implemented practically. One might start by selecting a tactic that
eliminates one of the requirements to prevent stalemate (conditions 1 through 4). Second, stalemate
may be avoided by adopting the appropriate action. Third, one might try to determine whether
stalemate exists (if conditions1 through 4 hold) and take action to break free. Adaptive judgments based
on the state of resource distribution will go through each of these tactics separately.
4.) Define in detail the Execution Paths 2 to 6.
-Execution Paths 2 – Process Q acquires to Release B down to Get B and Pass the Process Q releases
Resource A and B showing Paths 6.Example: Execution Path 1 – Process Q acquires Resource B and then
Resource A. Process Q then releases Resource B and A, respectively.
5.) Do Execution Paths 3 and 4 encompass the first three conditions for a deadlock to occur? Explain
your answer.
-One might start by selecting a tactic that eliminates one of the requirements to prevent stalemate
(conditions 1 through 4). Second, stalemate may be avoided by adopting the appropriate action. Third,
one might try to determine whether stalemate exists (if conditions1 through 4 hold) and take action to
break free. Adaptive judgments based on the state of resource distribution will go through each of these
tactics separately.
6.) If you are to implement deadlock prevention before the processes above reach the critical section,
would it be an indirect method or an indirect method? Why?
-An indirect method – because the purposes of deadlock prevention, a system can be modeled as a
collection of limited resources, which can be part toned into different categories, to be allocated to a
number of processes, each having different needs.
7.) Which deadlock avoidance approach would you suggest for the given situation above and why?
-Circular wait because this ensures that not a single process can request a resource which is being
utilized by some other process and no cycle will be formed. Among all the methods, violating Circular
wait is the only approach that can be implemented practically.
8.) Would you agree that deadlock is relative to the number of processes and available
resources in an operating system? Why or why not?
-Because each process has secured a fraction of the resources needed for completion and is waiting for
the release of the remaining resources, which are being held by other processes in the same group,
deadlock occurs when a group of processes become permanently halted.
9.) f you are asked to reconstruct the progress diagram above to eliminate the critical section, which is
the deadlock-inevitable region, which aspect(s) or area(s) would you modify? Explain how the
modification eliminates the deadlock.
-I would modify where the situation has a critical section or error so that will be eliminate the deadlocks
in this diagram showed. Adaptive judgments based on the state of resource distribution will go
through each of these tactics separately.
References:
https://www.studocu.com/ph/document/sti-college/sti-college/04-task-performance-1-asadasd/
39261953
https://www.studocu.com/ph/document/nueva-vizcaya-state-university/network-design-and-
management/concurrency-and-deadlocks/39893158
https://www.coursehero.com/file/117930304/Concurrency-and-Deadlocksdocx/
https://www.scribd.com/document/539498415/04-Task-Performance-1-5
https://www.cs.uic.edu/~jbell/CourseNotes/OperatingSystems/7_Deadlocks.html
https://www3.cs.stonybrook.edu/~kifer/Courses/cse306/lectures/chap6.pdf