Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

If a request from process P1 arrives for (2,0,0), Can the system grant this if it wants to avoid deadlock? Explain. Consider the following snapshot

If a request from process P1 arrives for (2,0,0), Can the system grant this if it wants to avoid deadlock? Explain. image text in transcribed
Consider the following snapshot of a system with resouces: A, B, Cand processes: Po, Pi Allocation Total Max A B C A B C 12 9 12 Po 2 1 3 4 9 4 1 2 3 2 1 2 Answer questions using the banker's algorithm. Here is the "safety" and "resource-request" algorithm for process i 1. Let Work and Finish be vectors of length m and n, respectively. Initialize Work Available Finish false for 0, 1, n-1 2. Find and i such that both (a) Finish false (b) Need, Work If no such i exists, go to step 4. 3. Work Work Allocation Finish true 4. go to step 2 in safe state If Finish ril true for all i, then the svstem is a Request request vector for process Pi k instances of resource type R If Request k then process P wants 1. If Request s Needi go to step 2. process has exceeded its Otherwise, raise error condition, since maximum claim 2. If Request, Available, go to step 3 are not available Otherwise P must wait, since resources state 3. Pretend to allocate requested resources to P by modifying the as follows: Available Available Request, Allocationi- Allocationi Request, Need, E Need, Request lf safe the resources are allocated to Pi state If unsafe Pi must wait, and the old resource-allocation is restored

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Online Systems For Physicians And Medical Professionals How To Use And Access Databases

Authors: Harley Bjelland

1st Edition

1878487442, 9781878487445

More Books

Students also viewed these Databases questions

Question

Behavior: Managing Our Identities?

Answered: 1 week ago