There are two sites s1 and s2 and three transactions T1, T2, T3.
The time table is as follows
S1 S2
t1: (T1, W, a) (T3,W, b)
t2: (T2, R, b) (T1, R, b)
t3: (T1, R, a)
t4: (T2, R, c)
t5: (T3, R, c)
Is there any deadlock in this distributed processing? Why?
Given problem :
S1 |
S2 |
|
T1 |
T1,write,a |
T3,write,b |
T2 |
T2,read,b |
T1,read,b |
T3 |
T1,read,a |
|
T4 |
T2,read,c |
|
T5 |
T3,read c |
Distrubuted deadlock :
t1: T1 initiated at site S1 and creating agent at S2
t2 : T2 initiated at site S1 and creating agent at s2 for T1
t3 initiated with reada with T1
t4 : reading T2
t5 : reading T3
Here only T1 seems to have deadlock. However there is no deadlock occurring overall
Because nothing is forming a loop and the resource is not in waiting process. Hold and wait doesn’t result in distributed deadlock .
There are two sites s1 and s2 and three transactions T1, T2, T3. The time table...
We have the following sequence of instructions in MIPS lw $t4, 4($s1) or $t1, $t2, $t3 or $t2, $t1, $t4 or $t1, $t1, $t2 1) Indicate any hazards and what the hazard types are. 2) Assume there is no forwarding in this pipelined processor and each stage takes 1 cycle. Draw the pipeline chart and calculate how many cycles are consumed 3) Assume there is forwarding in this pipelined processor and each stage takes 1 cycle. Draw the pipeline chart...
Consider two sets of integers, S = {s1, s2, ..., sm} and T = {t1, t2, ..., tn}, m ≤ n. (a) Propose an algorithm (only pseudo-code) that uses a hash table of size m to test whether S is a subset of T. (b) What is the average running time complexity of your algorithm?
For the system given in figure 3 identify if schedule 2 is conflict equivalent and view equivalent to schedule 1. Give proper reasons for you answer. Resolve the issues in schedule 2 by adopting appropriate locking scheme and apply deadlock prevention scheme to ensure prevention of deadlocks and starvation. (7) Table 2:Serial Schedule 1 T1 T2 T3 T4 T5 Read(X) Read(Z) Read(Y) Write(Z) ...
You are given with the following schedule, that consists of three transactions (T1, T2, T3) and three database elements (A, B and C) w3(A); r1(A); w1(B); r2(B); w2(C); r3(C) a) Identify all the conflicts (as defined in Section 18.2.1 in the book). Hint: draw a bipartite graph between transactions and elements, as done in class b) Draw a precedence graph (as defined in Section 18.2.2 in the book). Is the schedule conflictserializable? Justify your answer
An experiment to investigate the effects of various dietary starch levels on milk production was conducted on four cows. The four diets, T1, T2, T3, and T4, (in order of increasing starch equivalent), were fed for three weeks to each cow and the total yield of milk in the third week of each period was recorded (i.e. third week to minimize carry-over effects due to the use of treatments administered in a previous period). That is, the trial lasted 12...
Consider the following order of operation requests from transactions T1. T2. T3 r1 (A) r2 (A) r3 (A) r1 (B) r2 (B) w1 (B) w2 (A) Show the resulting schedule table when we have a scheduler that supports shared exclusive, and update locks.
Table 3.1 Time, t (s) Position, x (m) tn/t1 Time Squared, t^2 (s^2) (tn)^2/(t1)^2 xn/x1 t1, 0.40 x1, 0.25 1.0 .16 1 1 t2, 0.80 x2, 0.36 2.0 .64 4 1.4 t3, 1.2 x3, 0.52 3.0 1.4 9 2.1 t4, 1.6 x4, 0.71 4.0 2.6 16 2.8 t5, 2.0 x5, 0.95 5.0 4.0 25 3.8 t6, 2.4 x6, 1.2 6.0 5.8 36 4.8 Linear fit equation for Position Vs. Time: 0.545x - 0.0530 Quadratic fit equation for Position Vs. Time:...
Question 5. (20pts) (Briefly justify your answer) 1) Consider three transactions: T1, T2 and T3. Draw the precedence graph for the following schedule consisting of these three transactions and determine whether it is conflict serializable a) (5points) S: R1(X); R3(Z); W2(X); RI(Z); R3(Y); W2(Y), R3(Z), W1(Z), b) (5points) S: RI(X); R3(Z); W20x); RI(Y); R2(Y); W3(Y); R3(Z); WI(Z);
Assignment 4 File “quad_sol.s” contains a quadratic polynomial solver, which calculates the integer solution of a quadratic polynomial equation. 1. Rewrite the program using instructions reordering to reduce the number of cycles needed to execute the program. Indicate the number of cycle reduction. 2. Describe how forwarding would affect the execution of the program. CODE # quad_sol.s # This assembly program calculates the integer solutions of a quadratic polynomial. # Inputs : The coefficients a,b,c of the equation a*x^2 +...
to the next whole number The figure below details the process flow for two types of customers who enter Barbara's Boutique shop for customized dress alterations. After step T1, Type A customers proceed to step T2 and then to any of the three workstations at T3, followed by steps T4 and T7. After step T1, Type B customers proceed to Step T5 and then steps T6 and 17. The numbers in parentheses are the minutes it takes to process a...