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

Platech

assignment sheet
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)
32 views

Platech

assignment sheet
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

Hatulan, Jean Ray Lyndon B.

BSIT-303

Platform Technology TP

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)
-Two processes, P and Q, compete for resources A and B in this impasse. A
particular resource can only be accessed by one process at a time. In contrast to
Process Q, which 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? (5 points)
-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. (5 points)
-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.

4. Define in detail the Execution Paths 2 to 6. (5 items x 3 points)


Example: Execution Path 1 – Process Q acquires Resource B and then Resource A. Process Q
then releases Resource B and A, respectively.
• Process Q acquires Resource B, releases Resource B, and then acquires Resource A,
whereas Process P acquires Resource A.
• As opposed to Process P, Process Q receives Resource B. Deadlock happens when resource
A, which Process Q needs to move forward, is used by Process P.
• While Process Q receives resource B, Process P receives resource A. Process Q uses
resource B, which Process P needs to continue, causing a deadlock.
• While Process Q is running and P is waiting, Process P uses resources A and B. Then,
Process P discharges A and B.
• While Q waits, process P uses resources A and B before releasing each one in turn.

5. Do Execution Paths 3 and 4 encompass the first three conditions for a deadlock
to occur? Explain your answer. (5 points)
-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 conditions 1 through 4 hold) and take action to break free.
Adaptive judgments based on the state of resource distribution We 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?
(5 points)

- Indirect approach would be preferable since it is more effective and has a wider
range than the direct strategy, and because I could avoid even one stalemate.
Implementing indirect is easier than focusing on eliminating cyclic and waiting by
devoting each resource to a specific task.
7. Which deadlock avoidance approach would you suggest for the given situation
above and why? (5 points)
-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? (5 points)
-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. 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)
-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 We go through each of these tactics separately

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