Professional Documents
Culture Documents
04 Task Performance 1 - Monotilla
04 Task Performance 1 - Monotilla
Monotilla 11/13/2022
BSIT 303
5. Do Execution Paths 3 and 4 encompass the first three conditions for a deadlock to occur?
Explain your answer.
- Both pathways are indeed blocked because they satisfy the first three requirements of mutual
exclusion, hold and wait, and absence of preemption. This indicates that while one process
may retain a resource and may ask another process for a resource, it is not permitted to
forcibly take a resource from another process.
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?
- The indirect approach would be used by me because it is more effective and has a broader
scope. I could use this technique to prevent even a single stalemate. It is also simple to handle
things indirectly rather than trying to halt loops and wait times by handing each resource to
only one process.
7. Which deadlock avoidance approach would you suggest for the given situation above and why?
- In order to prevent a stalemate from occurring, this approach considers the three conditions
that must be accomplished. It supports more concurrent operations than avoidance detection.
If the current request for resource allocation is approved, the likelihood of a deadlock is
assessed immediately. It is necessary to be aware of any potential process requirements.
I advise using the Resource Allocation Denial, which specifies that a process's incremental
resource request won't be approved if it might result in a deadlock. What the banker's
algorithm is is well known. The system's state reveals how resources are currently allocated
to processes. A safe state is one in which no process is stopped by at least one distribution of
resources. Something is risky if it is dangerous.
What the terms "unsafe state" and "safe state" signify Imagine a system with a predetermined
quantity of resources and processes. A process may be provided 0 resources at any given time
or additional resources. The system's state reveals how resources are currently allocated to
processes. The two matrices, Claim and Allocation, as well as the previously constructed
vectors, Resource and Available, make up the state. To be deemed safe, a process must avoid
deadlock at least once during resource allocation (i.e., all the processes can be run to
completion). In actuality, a hazardous situation is one that is perilous.
8. Would you agree that deadlock is relative to the number of processes and available resources in
an operating system? Why or why not?
- Yes, because deadlock slows down unnecessary processes, it is comparable to the number of
processes and the number of resources available. By allowing one function to wait while the
other processes or threads carry on, the deadlock ensures that the software is secure and
proper.
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.
- I believe that most people believe Routes 3 and 4 have the highest chance of becoming
stranded in the area. I would alter the execution of these routes. To make room for it, I would
halt the process until ways 3 and 4 are free. The latency of path 3 would matter and prevent
the process from finishing on time because the process is run based on its resources.