schedules

10
SCHEDULES AND RECOVERABILITY BY: JASJEET KAUR MCA 3A A1000712021

Upload: jazz-bhatti

Post on 22-Nov-2014

171 views

Category:

Education


6 download

DESCRIPTION

 

TRANSCRIPT

Page 1: Schedules

SCHEDULESAND

RECOVERABILITY

BY:JASJEET KAUR

MCA 3AA1000712021

Page 2: Schedules

WHAT IS A SCHEDULE?

• When the transactions are executing concurrently in an interleaved fashion , then the order of execution of the operations from various transactions is known as a schedule

• In recovery and concurrency we deal with read_item, write_item operations and commit and abort operations

• We’ll denote read_item, write_item, commit and abort by R, W, Com and Ab

Page 3: Schedules

D = R1(X); W(X); Com1; R2(X); W2(X); Com2; R3(X); W3(X); Com3;

REPRESENTATION OF A SCHEDULE

Page 4: Schedules

HOW THE OPERATIONS CONFLICT IN A SCHEDULE?

• They belong to a different transaction

• They access the same item X

• At least one of operation is a write_item(X)

Example:S=R1(X); R2(X); W1(X); R1(Y) ; W2(X); W1(Y) ;

Page 5: Schedules

COMPLETE SCHEDULE

• A complete schedule is:• The operations in Schedule are

those including a commit or abort as the last operation for each transaction

• For any pair of operations from the same transactions Ti, their order of appearance in schedule is same as in Ti

• Set of conflicting pairs of one schedule are same to that in other

Page 6: Schedules

RECOVERABLE SCHEDULE

• Here Transactions commit only after all transactions whose changes they read, commit.

Page 7: Schedules

NONRECOVERABLE SCHEDULE

• Here Transactions commit before all transactions whose changes they read, commits.

Page 8: Schedules

HOW TO AVOID CASCADING ROLLBACK

• Also named cascadeless. A single transaction abort leads to a series of transaction rollback.

• Strategy to prevent cascading aborts is to disallow a transaction from reading uncommitted changes from another transaction in the same schedule.

Page 9: Schedules

STRICT ACHEDULE

• Here transactions can neither read nor write an item X until the last transaction that wrote X has commited(or aborted).

Page 10: Schedules

THANK YOU!!