Question

In: Computer Science

6.explain characterizing schedules based on recoverability and serialibality.(50marks) Need own answer and no internet answers r...

6.explain characterizing schedules based on recoverability and serialibality.(50marks)

Need own answer and no internet answers r else i il downvote nd report to chegg.Even a single is wrong i il downvote.its 50marks question so no short answer minimum 10page answer required and own answer r else i il downvote.

Note:Minimum 10page answer and no plagarism r else i il downvote and report to chegg.Minimum 10 to 15page answer required r else dnt attempt.strictly no internet answer n no plagarism.

its 50marks question so i il stricly review nd report

Solutions

Expert Solution

Serializability

Serializability is the preserve database consistency and assuming no transaction fails.

Two types of serializability.

  • Conflict serializability
  • View serializability

These two are the different forms of Schedule equivalence.

  • Conflict serializability

Let us consider a schedule  in which there are two consecutive instructions  ​​​​​​Ii and I​​​​​​j of transactions T​​​​​​i and Tj respectively ( i j ). The I​​​​​​i and I​​​​​​j refer to different data items. Then we can swap Ii and Ij without affecting the result of any instruction in the schedule. However if Ii and Ij refer to the same data item Q then the order of the two steps may matter since we are dealing with only read and write instructions.

T1 T2

read (A)

write (A)

read (A)

write (A)

read (B)

write (B)

read (B)

write (B)

We need to consider 4 cases:

1. Ii = read (Q) Ij = read (Q). The order of Ii and Ij does not matter. since the same value of Q is read by T​​​​​​i and Tj  regardless of the order.

2. Ii = read (Q) Ij = write (Q). If Ii comes before Ij then T​​​​​​i does not read the value of Q. That is written by Tj. Thus the order of Ii and Ij matters.

3. Ii = write (Q) Ij = read (Q). The order of Ii and Ij matters for reasons similar to those of the previous case.

4.Ii = write (Q) Ij = write (Q). Since both instructions are write operations. The order of these instructions does not affect either T​​​​​​i or Tj

Ii and Ij conflict if they are operations by different transactions on the same data item and at least one of these instructions is a write operations.

The write instruction of T1 conflicts with the read(A) instruction of T2. The write (A) instruction of T2 does not conflict with the read (B) instruction of T1. Because the two instructions access different data items.

The write (A) instruction of T2 does not conflict with the read (B) instruction of T1. We can swap these instructions to generate an equivalent schedule.

T1 T2

read (A)

write (A)

read (A)
read (B)
write (A)
write (B)

read (B)

write (B)

To swap non conflicting instructiond are:

  • To swap the read (B) instruction of T1 with the read (A) instruction of T2.
  • To swap the write (B) instruction of T1 with the write (A) instruction of T2.
  • To swap the write (B) instruction of T1 with the read (A) instruction of T2.

The final result of these swaps is a serial schedule.

If the schedule S can be transformed into a schedule S by a series of swaps of non-conflicting instructions . That is , S and S​​​​​​' are conflict equivalent.

The concept of conflict equivalence leads to the concept of conflict serializability. we say that schedule S is conflict serializable if it is conflict equivalent to a serial schedule.

T1 T2

read (A)

write (A)

read (B)

write (B)

read (A)

write (A)

read (B)

write (B)

Consider the significant operations of transaction T3 and T4 . This schedule is not conflict serializable since it is not equivalent to either the serial schedule < T3,T4 > or the serial schedule < T4,T3 >

T3 T4
read(Q)
write(Q)
write(Q)

It is possible to have two schedule that produce the same outcome , but they are not conflict equivalent.

  • View serializability

Consider two schedules S and S' . Where the same set of transactions participates in both schedules. The schedules S and S' are called view equivalent.

The three conditione are :

  1. For each data item Q if transaction T​​​​​​i reads the initial value of Q in schedule S, then transaction Ti must in schedule S' also read the initial value of Q.   
  2. For each data item Q if transaction T​​​​​​i execute read (Q) in schedule S and if the value was produced by a write (Q) operation executed by transaction Tj. Then the read (Q) operation of transaction T​​​​​​i must in schedule S' also read the value of Q that was produced by the same write (Q) operation of transaction Tj.   
  3. For each data item Q. The transaction that performs the final write (Q) operation in schedule S must perform the final write (Q) operation in schedule S'.   

The conditions 1 and 2 says that each transaction reads the same values in both schedules and therefore performs the same computation. The condition 3 coupled with condition 1 and 2 says that both schedules results in the same final system state.

The concept of view equivalence leads to the concept of view serializability. We says that a schedule S is view serializable. If it is view equivalent to a serial schedule.

Recoverability

The recoverability is the transaction with in the schedule. If transaction fails atomicity requires effect of transaction to be undone.

If a transaction T​​​​​​i fails for whatever reason we need to undo the effect of this transaction to ensure the atomicity property of the transaction. In a system that allows concurrent execution it is necessary also to ensure that any transaction Tj. To dependent on Ti is also aborted.

  • Recoverable schedules

Consider T9 is a transaction that performs only one instruction- read (A). Suppose the system allows T9 to commit immediately after executing the read (A) instruction. Thus T9 commits before T8 does. Now suppose that T8 fails before it commits. Since T9 has read the value of data item A written by T8, we must abort T9 to ensure transaction atomicity. However T9 has already committed and connot be aborted. Thus we have a situation where it is impossible to recover correctly from the failure of T8.

T8 T9

read (A)

write (A)

read (A)
read (B)

The recoverable schedule is one where for each pair of transaction T​​​​​​i and Tj such that Tj reads a data item previously written by T​​​​​​i . The commit operation of T​​​​​​i appears before the commit operation of Tj.

  • Cascadeless schedule

A schedule is recoverable, to recover from the failure of a transaction T​​​​​​i. We may have to roll back several transactions. Such situations occur if transactions have read data written by Ti. The transaction T10 writes a value of A. that is read by transaction T11. Transaction T11 writes a value of A is read by transaction T12. Suppose that at this point T10 fails. T10 must be rolled back. Since T11 is dependent on T10. T11 must be rolled back since T12 is dependent on T11. T12 must be rolled back. This phenomenon is a single transaction failure leads to a series of transaction rollbacks is called cascading rollback.

T10 T11 T12

read (A)

read (B)

write (A)

read (A)

write (A)

read (A)

The cascading rollback is undesirable. It leads to the undoing of a significant amount of work. It is desirable to restrict the schedules to those where cascasing rollbacks cannot occur. Such schedules are called cascadeless schedules. A cascadeless schedule is one where for each pair of transactions T​​​​​​i and Tj such that Tj reads a data item previously written by T​​​​​​i. The commit operation of T​​​​​​i appears before the read operation of Tj . It is easy to verify that every cascadeless schedule is also recoverable.


Related Solutions

6.explain characterizing schedules based on recoverability and serialibality.(50marks) Need own answer and no internet answers r...
6.explain characterizing schedules based on recoverability and serialibality.(50marks) Need own answer and no internet answers r else i il downvote nd report to chegg.Even a single is wrong i il downvote.its 50marks question so no short answer minimum 10page answer required and own answer r else i il downvote. Note:Minimum 10page answer and no plagarism r else i il downvote and report to chegg.Minimum 10 to 15page answer required r else dnt attempt.strictly no internet answer n no plagarism. its...
Explain equalization,neutralization,proportioning and volume reduction with examples and in details.(50marks) Need own answer and no internet...
Explain equalization,neutralization,proportioning and volume reduction with examples and in details.(50marks) Need own answer and no internet answers r else i il downvote nd report to chegg.Even a single is wrong i il downvote.its 50marks question so no short answer minimum 10page answer required and own answer r else i il downvote. Note:Minimum 10page answer and no plagarism r else i il downvote and report to chegg.Minimum 10 to 15page answer required r else dnt attempt.strictly no internet answer n no...
explain industrial wastewater treatment,strength reduction,suggested treatment methods and with diagram.(50marks) Need own answer and no internet...
explain industrial wastewater treatment,strength reduction,suggested treatment methods and with diagram.(50marks) Need own answer and no internet answers r else i il downvote nd report to chegg.Even a single is wrong i il downvote.its 50marks question so no short answer minimum 10page answer required and own answer r else i il downvote. Note:Minimum 10page answer and no plagarism r else i il downvote and report to chegg.Minimum 10 to 15page answer required r else dnt attempt.strictly no internet answer n no...
Explain sugar industry and textile industry with an examples and in details.(50marks) Need own answer and...
Explain sugar industry and textile industry with an examples and in details.(50marks) Need own answer and no internet answers r else i il downvote nd report to chegg.Even a single is wrong i il downvote.its 50marks question so no short answer minimum 10page answer required and own answer r else i il downvote. Note:Minimum 10page answer and no plagarism r else i il downvote and report to chegg.Minimum 10 to 15page answer required r else dnt attempt.strictly no internet answer...
explain pulp and paper industry in details with an example and diagram.(50marks) Need own answer and...
explain pulp and paper industry in details with an example and diagram.(50marks) Need own answer and no internet answers r else i il downvote nd report to chegg.Even a single is wrong i il downvote.its 50marks question so no short answer minimum 10page answer required and own answer r else i il downvote. Note:Minimum 10page answer and no plagarism r else i il downvote and report to chegg.Minimum 10 to 15page answer required r else dnt attempt.strictly no internet answer...
Explain turbidity,turbidity rod,turbimeters,jackson turbidimeter and baylis turbidimeters with example and explain in details.(50marks) Need own answer...
Explain turbidity,turbidity rod,turbimeters,jackson turbidimeter and baylis turbidimeters with example and explain in details.(50marks) Need own answer and no internet answers r else i il downvote nd report to chegg.Even a single is wrong i il downvote.its 50marks question so no short answer minimum 10page answer required and own answer r else i il downvote. Note:Minimum 10page answer and no plagarism r else i il downvote and report to chegg.Minimum 10 to 15page answer required r else dnt attempt.strictly no internet...
Describe: Where the pressure and density relations are used in SIMPLE-based solutions. The need for characterizing...
Describe: Where the pressure and density relations are used in SIMPLE-based solutions. The need for characterizing or defining the compressibility constant. The most important computational rules in an iterative solution process.
Describe the rules and regulation in disposal of hazardous waste and municipal solid waste.(50marks) Need own...
Describe the rules and regulation in disposal of hazardous waste and municipal solid waste.(50marks) Need own answer and no internet answers r else i il downvote nd report to chegg.Even a single is wrong i il downvote.its 50marks question so no short answer minimum 10page answer required and own answer r else i il downvote. Note:Minimum 10page answer and no plagarism r else i il downvote and report to chegg.Minimum 10 to 15page answer required r else dnt attempt.strictly no...
Please only answer if you are 100% sure and I need the answers now. QUESTION 6...
Please only answer if you are 100% sure and I need the answers now. QUESTION 6 Suppose that a Japanese firm imports iron for its operations from the US and sells its finished products to Spain. If the yen depreciates against the US dollar and appreciates against the euro, which of the following will occur, all else being equal? The Japanese firm's value will increase because they will pay less yen for their imports. The Japanese firm's value will increase...
Based on the below code: Answer the following questions and explain your answers: i)Presume that the...
Based on the below code: Answer the following questions and explain your answers: i)Presume that the code is instantiated in a process and it has JUST returned from its own call to fork() and there is now a clone of that process that is itself “just about” to pick up execution. Where will the clone child pick up its execution? ii)How does the clone child know it’s a clone? How does the parent process know it is not a clone,...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT