04 Task Performance PLATECH
04 Task Performance PLATECH
Task Performance
Concurrency and Deadlocks
Objective(s):
Instructions:
Analyze the illustrations below. Then, answer the following items. Search for related literature and/or relative
studies that would support your answers. Cite your references accordingly. (55 points)
1. Describe the deadlock scenario illustrated above based on your understanding. (5 points)
In my own understanding this is one of the scenarios of deadlock because based on my analyzation
the 3 and 4 in the illustrated image above are in the same blocks which cause deadlock.
This is the example of No Deadlocks so that if we compare the image above and to this illustration the
number 3 and 4 are not in the deadlock position
2. What do you think would happen if both Process P and Q need to get the same resource? (5
points)
It causes deadlock which both processes cannot progress, and the resources will be destroyed or
consume after it produce. The categories of this resource fall under the consumable resources.
3. Which concurrency mechanism would you suggest that might prevent the deadlock situation
above? Rationalize your answer. (5 points)
I think the hold and wait, like for example the Process P need to hold at least one resources
until the other process done or release.
5. Do Execution Paths 3 and 4 encompass the first three conditions for a deadlock to occur?
Explain your answer. (5 points)
Yes, the deadlock occurs in the path 3 and 4 because their execution has on the same block so that its
hard to progress both two.
6. If you are to implement deadlock prevention before the processes above reach the critical
section, would it be an indirect method or a direct method? Why? (5 points)
I would implement or choose the indirect method because it is more flexible than direct method.
Because the direct method possible there are only one condition which is the circular wait, but in the
indirect there are 3 conditions like the mutual exclusion, hold and wait, and No preemption.
7. Which deadlock avoidance approach would you suggest for the given situation above and why?
(5 points)
The deadlock avoidance approach that I would suggest in the situation is the resource allocation denial
this is good for me because it does not grant any other request to process if the allocation of the
resources might lead to deadlock.
8. Would you agree that deadlock is relative to the number of processes and available resources
in an operating system? Why or why not? (5 points)
Yes, because all the deadlocks involve different resources and processes also. So that it involves
conflicting resource.
9. If 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. (5 points)
If I reconstruct the progress diagram I would modify the fatal region of the diagram which is which is in
the gray shaded area, For instance, if P doesn't require simultaneously using both resources so that
the two processes take the following form
References: https://www.uobabylon.edu.iq/eprints/publication_3_15281_44