0% found this document useful (0 votes)
5 views2 pages

20.validation Based Protocol

The Validation Based Protocol, also known as Optimistic Concurrency Control Technique, consists of three phases: Read, Validation, and Write, where transactions read data without updating the database, validate their ability to write, and then apply updates if validated. It uses timestamps to ensure serializability and avoid issues like cascading rollbacks and deadlocks. However, it may lead to starvation for long-term transactions due to conflicts with short-term transactions.

Uploaded by

sharmasudip010
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)
5 views2 pages

20.validation Based Protocol

The Validation Based Protocol, also known as Optimistic Concurrency Control Technique, consists of three phases: Read, Validation, and Write, where transactions read data without updating the database, validate their ability to write, and then apply updates if validated. It uses timestamps to ensure serializability and avoid issues like cascading rollbacks and deadlocks. However, it may lead to starvation for long-term transactions due to conflicts with short-term transactions.

Uploaded by

sharmasudip010
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
You are on page 1/ 2

Validation Based Protocol in DBMS

Validation Based Protocol is also called Optimistic Concurrency Control Technique.


In the validation based protocol, the transaction Ti is executed in the following three
phases:

1. Read phase : In this phase, the transaction Ti reads the value of various data items and stores them
in temporary local variables of Ti.i.e it does not update actual database.
2. Validation Phase: Transaction Ti perform validation test whether it can copy value of its local
variable to database.Checking is performed to make sure that there is no violation of serializability
when the transaction updates are applied to the database.
3. Write Phase: If the validation of the transaction Ti is validated, then the temporary results are
written to the database i.e system applies actual update to the database .

To perform validation test,we need to know when the various phases of transaction Ti took place.
We shall therefore associate three di erent timestamp with transaction Ti.
Here each phase has the following di erent timestamps:
1. Start(Ti): It is the time when Ti started its execution.
2. Validation(Ti): It is the time when Ti just nished its read phase and begin its validation phase.
3. Finish(Ti): the time when Ti end it’s all writing operations in the database under write-phase.

We determine the serializability order by timestamp ordering technique,using the value of timestamp
Validation(Ti).
- Thus value TS(Ti)=Validation(Ti)

VALIDATION TEST:

The validation test for transaction Tj requires that for all transaction Ti with TS(Ti)<TS(Tj) one of the
following condition hold.
1. Finish(Ti)<Starts(Tj), since Ti nished before Tj started hence serializability order is indeed
maintained.
2. Finish(Ti)<Validation(Tj).This ensures actual write by Ti and Tj will not overlap.
3. Validation(Ti)<Validation(Tj).It ensures that Ti has completed read phase before Tj completed read
phase.
fi
ff
ff
fi
Advantages:

1. Avoid Cascading-rollbacks: This validation based scheme avoid cascading rollbacks since the nal
write operations to the database are performed only after the transaction passes the validation phase.
If the transaction fails then no updation operation is performed in the database. So no dirty read will
happen hence possibilities cascading-rollback would be null.

2. Avoid deadlock: Since a strict time-stamping based technique is used to maintain the speci c order
of transactions. Hence deadlock isn’t possible in this scheme.

Disadvantages:
1. Starvation: There might be a possibility of starvation for long-term transactions, due to a sequence
of con icting short-term transactions that cause the repeated sequence of restarts of the long-term
transactions so on and so forth.
fl
fi
fi

You might also like