Question

In: Computer Science

Assuming that there are 9 processes in a distributed system numbered p1, p2, ..., p9. Describe...

Assuming that there are 9 processes in a distributed system numbered p1, p2, ..., p9. Describe a situation where deadlock may occur when using Maekawa’s algorithm in this system.

Solutions

Expert Solution

Meakawas algorithm has 3 msgs reply,request and release msg

every site can send a request msg only from the subset sites

request subsets of every site is selected such that request subsets are disjoint , at least one element will be in common

one time one reply msg can be sent by a site

a site can send a reply msg only after getting release msg from a previous reply msg

to construct request sets we have 4 methods

m1: 2 request subsets are disjoint

m2: si belongs to Ri ie every site is under the request set

m3 : size of a request set is equal to k

M4:. Every site or process has k number of request set

Now to enter critical situation

All sites of request set wil get request msg

I will send reply msg to a request msg only when i have not sent any reply msg after a release msg

If not the request msg will be stored in a queue

Performance 3 rootN no of msgs ie root N no of msgs each for reply, request and response msg

The picture shows 9 processes in a distributive system

In all 5 distributions ie p4 to p1

P5 to p2

P6 to p3

P7to p9

P9 to p8 we come across deadlocks as. P4 sent reply msg to p1 and cannot send to any other process such as p2 and p2 will be deadlocked being waiting for reply msg from p1

Similarly p5 sends reply msg to p2 whereas p3 enters deadlock situation by waiting for rply msg from p5

P1 Waits for all 3 reply msgs from p1,p4 and p6

Thus enter deadlock by waiting for p6 reply msg which is already sent by p6 to p3

As according to meakawas algo one process can send only 1 reply msg at a time

P3 waits for reply msg from p5 and p5 has sent msg to p2 and so on.


Related Solutions

Assume you have two processes, P1 and P2. P1 has a high priority, P2 has a...
Assume you have two processes, P1 and P2. P1 has a high priority, P2 has a low priority. P1 and P2 have one shared semaphore (i.e., they both carry out waits and posts on the same semaphore). The processes can be interleaved in any arbitrary order (e.g. P2 could be started before P1).             i.             Explain the problem with priority inversion Briefly explain whether the processes could deadlock when:            ii. both processes run on a Linux system as...
U=(q1q2)0,5 Y= 70 p1=4$ p2=9$ P1 increases to 9$ calculate the compensation variation.
U=(q1q2)0,5 Y= 70 p1=4$ p2=9$ P1 increases to 9$ calculate the compensation variation.
Consider a weighted voting system with nine players (P1-P9). a) Find the number of sequential coalitions...
Consider a weighted voting system with nine players (P1-P9). a) Find the number of sequential coalitions in this weighted voting system. b) How many sequential coalitions in this weighted voting system have P7 as the last player? c) How many sequential coalitions in this weighted voting system have P6 as the third player? d) How many sequential coalitions in this weighted voting system do NOT have P1 as the first​ player?
Suppose there are 4 processes P1, P2, P3 and P4 getting to ready queue in various...
Suppose there are 4 processes P1, P2, P3 and P4 getting to ready queue in various arrival times and with various bursts times as detailed in the table below. Using Shortest-remaining-time-first scheduling approach, find waiting time for each process and the average waiting time and provide detailed steps taken to find the answer. Using time quantum of milliseconds. Process Arrival time (ms) Burst Time (ms) P1 0 8 P2 2 3 P3 6 2 P4 9 7
Consider following four processes arriving in the order of P1, P2, P3 and P4. Process   Arrival...
Consider following four processes arriving in the order of P1, P2, P3 and P4. Process   Arrival Time CPU burst Time P1             0.0     6 P2    0.0                              8 P3              0.0                                7 P4              0.0                                 3 What is the average waiting time for RR scheduling (time quantum = 5)? What is the average waiting time for SJF scheduling? What is the average waiting time for FCFS scheduling?
11. Consider three processes P1, P2, and P3, and all them three are ready to run...
11. Consider three processes P1, P2, and P3, and all them three are ready to run at time = 0. Each process has two CPU bursts. When its first CPU burst is completed, each process requests a blocking I/O operation on a separate I/O device. When a process starts to receive service for I/O, the OS scheduler selects and dispatches another process available at the ready queue. The CPU scheduling policy is preemptive priority-based scheduling, where a process being running...
6.1) Consider 3 processes, P1, P2, and P3, all available at time 2, 0, 3, respectively,...
6.1) Consider 3 processes, P1, P2, and P3, all available at time 2, 0, 3, respectively, with the CPU bursts as 6, 9, and 4, respectively, what would be the turnaround time for each of the processes and what would be the average turnaround time for those 3 processes if SJF (Shortest Job First) CPU scheduling algorithm were used? (5 points) 6.2) Based on the same scenario given in the previous question, what would be the turnaround time for each...
6. Consider the following set of processes P1, P2, P3, P4. Process Burst Time Arrival Time...
6. Consider the following set of processes P1, P2, P3, P4. Process Burst Time Arrival Time Priority P1 3 0 1 P2 5 1 2 P3 8 3 3 P4 4 4 2 a) Draw Gantt charts that illustrate the execution of these processes using the following scheduling algorithms: first-come, first-served (FCFS), priority scheduling (larger number=high priority), and Round-Bobin (RR, quantum=2). b) Compute the average waiting time, turnaround time for the three algorithms. Turnaround time – amount of time to...
1.) You are given 4 processes P1,P2, P3, P4 all ariving at the same time t=0,...
1.) You are given 4 processes P1,P2, P3, P4 all ariving at the same time t=0, in a dual-processor SMP. (The two CPUs are referred to as CPU-0 and CPU-1.) The service time for each process is 40s, 20s, 20s and 10s respectively (a) What are the possibilities for the turnaround time of the job that includes the execution of all 4 processes? You may assume that each service time is just CPU time and no process interferes with the...
2.  [17: 20, 10, 2, 1] Find the Banzhaf power distribution for this system. P1:                  P2:         
2.  [17: 20, 10, 2, 1] Find the Banzhaf power distribution for this system. P1:                  P2:                  P3:                  P4:
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT