Characterizing Schedules (Recoverability)

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 15

Database Management

systems
Characterizing schedules based on
Recoverability
FR
Things to cover
• Recoverable schedule
• Non-Recoverable schedule
• Types of Recoverable
schedules

▪ Cascading schedules
▪ Cascadeless schedules
▪ Strict schedules

Add a footer 2
FR

Recoverability

Recoverability refers to the ability of a system to restore its state in the


event of failure.

Add a footer 3
Recoverable FR
Schedules

• Once a transaction T is committed , it should never be necessary to rollback


T. The schedules that theoretically meet this criterion are Recoverable.

• A schedule S is recoverable if no transaction T in S commits until all


transactions T that have written some item X that T reads have committed. .

Add a footer 4
FR

This is a recoverable schedule since T1 commits before


T2 , that makes the value read by T 2 correct.

Add a footer 5
FR
Non Recoverable schedules

A schedule is called an irrecoverable or Non recoverable schedule when


• A transaction does a dirty read operation from a transaction that is
not committed.
• And commits before the transaction from where it has read the
value.

6
FR

T2 read the value of A written by T1, and committed. T1 later


aborted, therefore the value read by T 2 is wrong, but since
T2 committed, this schedule is non-recoverable.

7
FR
Types of Recoverable schedules
1.Cascading schedules

• Also called Avoids cascading aborts/rollbacks (ACA). When there is a failure in


one transaction and this leads to the rolling back or aborting other dependent
transactions, then such scheduling is referred to as Cascading rollback or
cascading abort.

8
Example:- FR

9
FR
2.Cascade-less schedules

• A schedule is cascaded less if it does not result in a cascading rollback of


transactions after a failure.

• In a cascade-less schedule, a transaction that has read uncommitted data from


another transaction cannot commit before that transaction commits.

• If a transaction fails before committing, its updates must be rolled back, but any
transactions that have read its uncommitted data need not be rolled back.

10
FR

• Here, the updated value of X is read by transaction T2 only after the commit of
transaction T1. Hence, the schedule is cascadeless schedule.

11
FR
3.Strict schedules

• In Strict schedule, if the Read or Write operation of a transaction precedes a


conflicting operation of another transaction then the commit or abort operation of
such transaction should also precede the conflicting operation of other transaction.

• A strict schedule is strict in nature.

12
FR

• Here, transaction T2 reads and writes the updated or written value


of transaction T1 only after the transaction T1 commits.

• Hence, the schedule is strict schedule.


13
Relation between the
Recoverable schedules

14
FR

Thank you!

Add a footer 15

You might also like