Question

In banker's algorithm, which process will be handle first? process   need (A, B) p1            1, 4...

In banker's algorithm, which process will be handle first?

process   need (A, B)
p1            1, 4
p2             1, 3

avaliable: 2, 4

Is there any order exists?

Homework Answers

Answer #1

Answer)

In banker's algorithm, the process will be handle first is the:

p1 with need 1, 4

Since the system has available resources as: 2, 4

After allocation to p1: the resources available would be:

2, 4 – 1, 4 = 1, 0

P2 has to wait for p1 returning the resources to the system.

After this, p1 terminates and returns the resources.

After this p2, can allocate the resources and use them in the above style.

For the order, the correct/efficient one would be:

P1 –p2

But the process can execute p2 –p1 also. So what’s the difference?

The difference is in utilization:

P1 utilizes more resources than p2 and thus if allocated first the B resources are all utilized, which is not the case for p2.

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
2. Let P 1 and P2 be planes with general equations P1 : −2x + y...
2. Let P 1 and P2 be planes with general equations P1 : −2x + y − 4z = 2, P2 : x + 2y = 7. (a) Let P3 be a plane which is orthogonal to both P1 and P2. If such a plane P3 exists, give a possible general equation for it. Otherwise, explain why it is not possible to find such a plane. (b) Let ` be a line which is orthogonal to both P1 and P2....
Process Burst Time Priority Arrival p1 8 15 0 p2 3 20 0 p3 4 20...
Process Burst Time Priority Arrival p1 8 15 0 p2 3 20 0 p3 4 20 20 p4 4 20 25 p5 5 5 45 p6 5 15 55 The following processes are being scheduled using a preemptive, priority-based, round-robin scheduling algorithm. Each process is assigned a numerical priority, with a higher number indicating a higher relative priority. The scheduler will execute the highest-priority process. For processes with the same priority, a round-robin scheduler will be used with a time...
1. What is the average waiting time for Processes If the Operating System uses the Shortest-Job-First...
1. What is the average waiting time for Processes If the Operating System uses the Shortest-Job-First (SJF) Scheduling Algorithm? (P1=5 ms, P2=10 ms, P3=15 ms) 2. How many page faults occur in the Optimum Page Replacement algorithm (OPR) with the following reference string for three-page frames?    Reference String: 4,2,1,3,2,3,4,1 3. What is the average waiting time for Processes If the Operating System uses Shortest-Job-Remaining-First (SJRF) Scheduling Algorithm? (P1=5 ms, P2=10 ms, P3=15 ms) Arrival Time ( P1=0 ms, P2=5...
Problem 6 The following tables show the timing for processes using two different scheduling algorithms based...
Problem 6 The following tables show the timing for processes using two different scheduling algorithms based on the table of process arrival times and burst times (All ties were resolved using the arrival time). Using this information: Calculate the average turnaround time for each algorithm. Show your work. Name the scheduling algorithm used to generate the timing tables. Process Arrival Time Burst Time P1 0 4 P2 3.9 1 P3 2.9 3 P4 0.9 2 P5 1.9 4 Mystery Algorithm...
1. Assuming n1 = n2, p1 ≈ .4, p2 ≈ .7, sampling error = .01, and...
1. Assuming n1 = n2, p1 ≈ .4, p2 ≈ .7, sampling error = .01, and a confidence interval of 99%, estimate (p1 – p2). A. 24,696 B. 28,369 C. 29,392 D. 29,954 2. The line for which the Sum of Errors (SSE) is at a minimum is called a regression line, and it's obtained using the method of _______. A. Prediction B. Null Hypothesis Testing C. Least Squares D. Probabilistic Models
The following processes are being scheduled using a preemptive, priority-based, round-robin scheduling algorithm. Each process is...
The following processes are being scheduled using a preemptive, priority-based, round-robin scheduling algorithm. Each process is assigned a numerical priority,with a higher number indicating a higher relative priority. The scheduler will execute the highest-priority process. For processes with the same priority, a round-robin scheduler will be used with a time quantum of 10 units. If a process is preempted by a higher-priority process, the preempted process is placed at the end of the queue. Process            Burst Time Arrival Time...
The null and alternative hypotheses are: H0:p1−p2=0H0:p1−p2=0 H1:p1−p2≠0H1:p1−p2≠0 A sample of 340 observations from the first...
The null and alternative hypotheses are: H0:p1−p2=0H0:p1−p2=0 H1:p1−p2≠0H1:p1−p2≠0 A sample of 340 observations from the first population indicated that X1 is 300. A sample of 320 observations from the second population revealed X2 to be 260. Use the 0.02 significance level to test the hypothesis. a. State the decision rule. (Negative answer should be indicated by a minus sign. Round the final answers to 2 decimal places.) The decision rule is to reject H0 if z   is outside  (  ,  ). b. Compute...
A set of processes along with their burst time in milliseconds is given below. The processes...
A set of processes along with their burst time in milliseconds is given below. The processes should execute in First Come First Served order. Assume that the quantum (q) is 3: Process Burst Time P1 22 P2 4 P3 12 P4 15 P5 2 Find the average waiting time using the Round Robin algorithm. Round your answer to 2 decimal places
Write the algorithm for this program using the C++ language (not python or java). The explanation...
Write the algorithm for this program using the C++ language (not python or java). The explanation needs to be at least 250 words. Explain everything throughly step by step. While there is a built-in pop_back function in the vector class, there is no built-in pop_front function. Suppose a program needs a pop_front function that will remove the first element from the vector. For example, if the original vector is [1, 2, 3, 4, 5], then after passing in this vector...
Suppose prices are given by p1 = 2 and p2 = 4. Which of the following...
Suppose prices are given by p1 = 2 and p2 = 4. Which of the following consumption patterns are consistent with the assumption that the consumer chooses the consumption bundle that he prefers the most among those affordable if his preferences are non-satiated (“more-is-better”) and strictly convex? (a) If m = 10, he consumes (2, 1). If m = 14, he consumes (3, 2). (b) If m = 12, he consumes (2, 2). If m = 18, he consumes (1,...
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT