Question

Why the solution is B? 1) Consider the following transactions with data items P and Q...

Why the solution is B?

1) Consider the following transactions with data items P and Q initialized to zero:

T1: read (P) ;
    read (Q) ;
    if P = 0 then Q : = Q + 1 ;
    write (Q) ;
T2: read (Q) ;
    read (P) ;
    if Q = 0 then P : = P + 1 ;
    write (P) ;

Any non-serial interleaving of T1 and T2 for concurrent execution leads to
(A) A serializable schedule
(B) A schedule that is not conflict serializable
(C) A conflict serializable schedule
(D) A schedule for which a precedence graph cannot be drawn

Answer (B)

Homework Answers

Answer #1

Assume that there is some non-serial interleaved concurrent execution.

Consider

T1:

read(P);

read(Q);

Pre-empt it

T2:

read(Q);

read(P);

stmt;

write(P);

Execute T1 from the point of pre-emption.

T1:

stmt;

write(Q);

Now carefully read the below statements.

From T1 -------> T2 there is a read- write conflict of data P.

From T2 --------> T1 there is a read -write conflict of data Q.

So, if we draw a precedence graph for the conflict of the transactions, it forms a cycle

Whenevr a cycle forms in a precedence graph, then it is not conflict serializable.

Option A is false because the schedule which we constructed is not serializable.

option C is false because we didn't get conflict serializable.

Option D is false because we can construct a precedence graph for it.

So, option B is correct.

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
Consider the market for a homogeneous good (say bananas). The demand function is q d (p)...
Consider the market for a homogeneous good (say bananas). The demand function is q d (p) = αpε , where α > 0 is a constant, and ε < 0 stands for the elasticity of demand. The supply function is q s (p) = p η , where η > 0 stands for the elasticity of supply. Write Python codes to analyze this market in the following cases. (a) Set α = 1 and consider the following values for the...
Consider the differential equation L[y] = y′′ + p(t)y′ + q(t)y = f(t) + g(t), and...
Consider the differential equation L[y] = y′′ + p(t)y′ + q(t)y = f(t) + g(t), and suppose L[yf] = f(t) and L[yg] = g(t). Explain why yp = yf + yg is a solution to L[y] = f + g. Suppose y and y ̃ are both solutions to L[y] = f + g, and suppose {y1, y2} is a fundamental set of solutions to the homogeneous equation L[y] = 0. Explain why y = C1y1 + C2y2 + yf...
Consider an asymmetric duopoly. The market demand is p = 1 − Q. Firm 1 has...
Consider an asymmetric duopoly. The market demand is p = 1 − Q. Firm 1 has zero cost while Firm 2 has constant marginal cost c distributed over the interval 0, 1/2. a. Find the equilibrium when firms compete in quantities. b. Suppose a regulator can marginally decrease c. Will this change increase social welfare and why? Give your answer in terms of the market share of Firm 2. c. Suppose now that firms compete in prices. Find the Bertrand...
1. Consider the following demand and supply curves: P 20 18 16 14 Q 0 1...
1. Consider the following demand and supply curves: P 20 18 16 14 Q 0 1 2 3 P 2 3 4 5 Q 0 1 2 3 a. What is the equation of this demand function? b. What is the equation of this supply function? c. Solve for equilibrium price and quantity. D. The market demand and supply for jet fuel is provided by the following functions: Qd = 140 - P Qs = -160 + 4P Where: P=...
Suppose the following schedule represents the demand curve for a non- discriminating, single price monopolist: P...
Suppose the following schedule represents the demand curve for a non- discriminating, single price monopolist: P Q TR MR 18 0 15 1 12 2 9 3 6 4 3 5 0 6 a. Complete the table. b. Plot the demand and MR curves below. c. Explain why the MR of the third unit is less than its price ($9). d. Calculate the Elasticity of Demand at the price of $12? e. Label the elastic, unitary elastic, and inelastic segments...
1. Consider the general form of the utility for goods that are perfect complements. a) Why...
1. Consider the general form of the utility for goods that are perfect complements. a) Why won’t our equations for finding an interior solution to the consumer’s problem work for this kind of utility? Draw(but do not submit) a picture and explain why (4, 16) is the utility maximizing point if the utility is U(x, y) = min(2x, y/2), the income is $52, the price of x is $5 and the price of y is $2. From this picture and...
Applications I Consider the following data representing the total time (in hours) a student spent on...
Applications I Consider the following data representing the total time (in hours) a student spent on reviewing for the Stat final exam and the actual score on the final. The sample of 10 students was taken from a class and the following answers were reported. time score 0 23 4 30 5 32 7 50 8 45 10 55 12 60 15 70 18 80 20 100 Part 1: Use the formulas provided on the 3rd formula sheet to compute...
Statistical Analysis for Business Applications I Consider the following data representing the total time (in hours)...
Statistical Analysis for Business Applications I Consider the following data representing the total time (in hours) a student spent on reviewing for the Stat final exam and the actual score on the final. The sample of 10 students was taken from a class and the following answers were reported. time score 0 23 4 30 5 32 7 50 8 45 10 55 12 60 15 70 18 80 20 100 Part 1: Use the formulas provided on the 3rd...
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT