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
C program fractions.c that does the following: 1. The program starts by making the user enter...
C program fractions.c that does the following: 1. The program starts by making the user enter a non-negative integer number a, called the first numerator. If the user enters a negative number, the program repeats the entry. 2. The program then makes the user enter a positive integer number b, called the first denominator. If the user enters a non-positive number, the program repeats the entry. 3. The program then makes the user enter a non-negative integer number c, called...
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...
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