0% found this document useful (0 votes)
6 views47 pages

Transaction Processing and Schedules

Uploaded by

hassanmansuri570
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views47 pages

Transaction Processing and Schedules

Uploaded by

hassanmansuri570
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

V.

Transaction Processing
-
State diagram of transaction
-
Serial Schedule
Non serial Schedule
View serializable

Schedule S1 and S2 are view equivalent therefore view


serializable
Non view serializable

Schedule S1 and S2 are not view equivalent therefore not


view serializable
Serializable Schedule:
Transaction to execute concurrently without interfering with one another.
•It identifies which schedules are correct when executions of the
transaction have to interleave their operations.
• A non-serial schedule will be serializable if its result is equal to the
result of its transactions executed serially.
• This is used to maintain the consistency (uniformity/stability) of the
database.
• Since concurrency is allowed in this case thus, multiple transactions
can execute concurrently.
•Helps in improving both resource utilization and CPU throughput (flow
capacity).
•A non-serial schedule will be serializable if its result is equal to the result
of its transactions executed serially.
Conflict operations
Conflict Type Pair of Operations Meaning

A transaction reads a value that


Read–Write (R–W) Conflict Ri(X) & Wj(X)
another later writes → conflict

A transaction writes a value that


Write–Read (W–R) Conflict Wi(X) & Rj(X)
another later reads → conflict

Both write on same data item →


Write–Write (W–W) Conflict Wi(X) & Wj(X)
conflict
S:
r₂(Z); r₂(Y); w₂(Y); r₃(Y); r₃(Z); r₁(X); w₁(X); w₃(Y); w₃(Z); r₂(X); r₁(Y); w₁(Y); w₂(X);
Test whether schedule is conflict serializable

Schedule is not conflict serializable because


precedence graph contains cycle
Precedence graph

Schedule is conflict serializable


Conflicting pair
Example test for conflict serializability
R3(a) and W1(a)
R2(b) and W3(b)
R2(c) and W1(c )
W2(c ) and R1(C)
Also W2(c ) and W1( c)

No cycle , It is conflict
serializable
Numerical Demonstrating
schedule is not conflict
serializable but it is view
serializable

You might also like