1,321 views
1 votes
1 votes

HOW TO SOLVE THOSE TYPE OF QUESTION?

3 Answers

Best answer
2 votes
2 votes

A schedule Si that is view equivalent to another schedule Sj must the following conditions satisfied:

1. If transaction Ti reads the initial value of a data item in a schedule Si, then transaction Ti should read the initial value of that data item in schedule Sj.

Here since all the three transactions are reading the initial values of data item A, so in the view equivalent schedule also, all the three transactions will read the value of data item A.

2. if a transaction Ti writes the value of a data item(producer) that is read by a transaction Tj (consumer) in a schedule Si, then transaction Ti must write the value of the data item that is read by Tj in the schedule Sj.

In this question, since there are no producer-consumer dependencies between the transactions in the schedule S, so we need not worry about this condition not being satisfied in the view equivalent schedule.

3.if a transaction Ti writes the final value of a data item in schedule Si, then transaction Ti must also write the final value of that data item in schedule Sj.

Since here transaction T3 writes the final value of data item B in the schedule S, so in all schedules that are view equivalent to S, transaction T3 must write the final value of data item B.

Hence keep W3(B) fixed at the end. the remaining 5 operations can be arranged in 5! ways and the since the ordering of operations within a single transaction must not change, so divide 5! by 2! for each of the two transactions T1 and T2(Note: since there is only a single operation remaining in T3 after fixing W3(B) at the end, so we need not worry about the ordering of R3(B) since there is only one place left for it to appear, i.e. before W3(B))

Therefore, the number of schedules that are view equivalent to S are= 5! / (2! * 2!)=30

hence 30 view equivalent schedules are possible out of which one is already given in the question, i.e. schedule S.

selected by
0 votes
0 votes
Only one schedule is possible which is  (T1 T2 T3)

Is the answer is correct ??

inform me  kindly
0 votes
0 votes

The polygraph for it would be this right ?

Related questions

2 votes
2 votes
4 answers
1
8 votes
8 votes
2 answers
4