0% found this document useful (0 votes)
59 views

Deadlocks Platform Technology

The document discusses deadlock scenarios that can occur when multiple processes attempt to access shared resources. It describes a scenario where Process P acquires resource B while Process Q acquires resource A, creating a deadlock. The document suggests using a concurrency mechanism like circular wait to prevent such deadlocks by ensuring no process requests a resource already in use by another process. It defines different execution paths for the processes and asks questions about deadlock conditions and prevention methods.

Uploaded by

kimishan1916
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
59 views

Deadlocks Platform Technology

The document discusses deadlock scenarios that can occur when multiple processes attempt to access shared resources. It describes a scenario where Process P acquires resource B while Process Q acquires resource A, creating a deadlock. The document suggests using a concurrency mechanism like circular wait to prevent such deadlocks by ensuring no process requests a resource already in use by another process. It defines different execution paths for the processes and asks questions about deadlock conditions and prevention methods.

Uploaded by

kimishan1916
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

1.) Describe the deadlock scenario illustrated above based on your understanding.

-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

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy