This document discusses various techniques for concurrency control, including:
1. Types of locks (shared/exclusive) and how they are represented and managed through lock tables and a lock manager.
2. Serializability of transactions can be achieved through two-phase locking protocols where transactions lock data in two exclusive phases - growing and shrinking.
3. Deadlocks can occur with two-phase locking and various techniques like deadlock prevention/detection and priority-based scheduling can help address starvation issues.
4. Timestamp-based ordering assigns timestamps to transactions and data items to enable conflict-serializable execution through timestamp validation on reads and writes.
Powerpoint Presentaion on Concurrency Control Protocols,
is part of Btech 3rd year DBMS syllabus.
This slide is part of assignment provided during session 2018-2019
Powerpoint Presentaion on Concurrency Control Protocols,
is part of Btech 3rd year DBMS syllabus.
This slide is part of assignment provided during session 2018-2019
Transaction processing means dividing information processing up into individual, indivisible operations, called transactions, that complete or fail as a whole; a transaction can't remain in an intermediate, incomplete, state (so other processes can't access the transaction's data until either the transaction has
A deadlock is a condition where two or more tasks are waiting for each other in order to be finished but none of the task is willing to give up the resources that other task needs. In this situation no task ever gets finished and is in waiting state forever.
e.g: Quiz,pen,page.
six payment methods (cash, check, credit card, debit card, direct payment, e-bill) used for 16 different types of transaction in the U.S., such as housing, grocery, dining, health, and car expenses. Transaction-specific payment method usage would give a better understanding of changes in payment method use than those based on mere “Did you use this payment method for any transaction?” question.
Different Types of Social Media Channels - SysomosSysomos
This presentation takes a look at different types of social media and
the application of these platforms in business. It gives a summary of
all popular business uses of twitter, blogs, youtube, forums, facebook
and message boards. It breaks down how a company may want to use just
one medium or several different social media outlets. This also
showcases examples of industry related social media campaign
techniques.
For: PR, Marketing, Social Media Professionals, CMOs, CEOs, Management,
Research and analytics, etc..
Transaction processing means dividing information processing up into individual, indivisible operations, called transactions, that complete or fail as a whole; a transaction can't remain in an intermediate, incomplete, state (so other processes can't access the transaction's data until either the transaction has
A deadlock is a condition where two or more tasks are waiting for each other in order to be finished but none of the task is willing to give up the resources that other task needs. In this situation no task ever gets finished and is in waiting state forever.
e.g: Quiz,pen,page.
six payment methods (cash, check, credit card, debit card, direct payment, e-bill) used for 16 different types of transaction in the U.S., such as housing, grocery, dining, health, and car expenses. Transaction-specific payment method usage would give a better understanding of changes in payment method use than those based on mere “Did you use this payment method for any transaction?” question.
Different Types of Social Media Channels - SysomosSysomos
This presentation takes a look at different types of social media and
the application of these platforms in business. It gives a summary of
all popular business uses of twitter, blogs, youtube, forums, facebook
and message boards. It breaks down how a company may want to use just
one medium or several different social media outlets. This also
showcases examples of industry related social media campaign
techniques.
For: PR, Marketing, Social Media Professionals, CMOs, CEOs, Management,
Research and analytics, etc..
The Ultimate Marketing Guide to SnapchatRoss Simmonds
In this Snapchat Marketing Guide, we're going to look at everything you need to get started with Snapchat along with some strategies and insights that will help you take your Snapchat marketing to the next level.
11 Facts You Probably Didn't Know About PastaJodie Harper
Pasta has been a staple in the Canadian diet for generations, and you probably think you know all there is to know about pasta, right? Wrong! Here are 11 fun facts you probably didn't know about these delicious Italian noodles — including *spoiler alert* the fact that Italy wasn't even the first country where pasta was enjoyed. Shared by: http://rasacatering.sg/
Man eats to live and not that he lives in order to eat, thus food is considered one of the basic necessities of human beings. Though the choices and preferences differ, there are some common foods that are consumed in larger quantities than others all over the world. This is a ranking of the top ten most eaten foods in all the continents of the world.
Shared by: http://rasacatering.sg/
6 Questions to Lead You to a Social Media StrategyMark Schaefer
It can be intimidating and overwhelming to try to develop a social media strategy, but if you follow through on these six questions, your strategy will reveal itself.
The slides provides an overview on the planning phase of the project plan development. It also provides an introduction on the contents and forms of a project work plan
11 Things Healthy People Do Every MorningEason Chan
It all starts at home. A great day begins with an amazing morning. With constant distractions and the daily pressure of responsibilities, it’s important to start your morning right to get your mind and body prepared for your daily routine. These 11 tips will bring out the best of your morning, day, week, and life. Shared by: http://www.familychiropractic.com.sg/
The aim of this list of programming languages is to include all notable programming languages in existence, both those in current use and ... Note: This page does not list esoteric programming languages. .... Computer programming portal ...
In our web 2.0 world, the business landscape has changed. Consumers refuse to be interrupted anymore - demanding that brands engage with them.
People do business with people they like, know, and trust. By utilizing the social media tools available to all of us, businesses can become human. By creating valuable content and engaging with customers where they are, businesses are creating real relationships, resulting in real trust.
This presentation offers a high-level overview to where we've been, where we are, and we're we are going in social media. It gives simple-to-follow steps to start implementing social media into a business. It's not comprehensive, but can help a business take that first step.
Content developed by Jon Thomas and M80 (m80im.com). Presentation designed by Jon Thomas at Presentation Advisors (www.presentationadvisors.com).
Purpose of Concurrency Control
– To enforce Isolation (through mutual exclusion) among conflicting transactions.
– To preserve database consistency through consistency preserving execution of transactions.
– To resolve read-write and write-write conflicts.
This is an PPT of DBMS. It includes the following topic "Concurrency control ensure consistency & reliability properties of transaction & Deadlock Handling "
Dealing with Deadlock and Starvation
• Deadlock prevention
– A transaction locks all data items it refers to before it begins execution.
– This way of locking prevents deadlock since a transaction never waits for a data item.
– The conservative two-phase locking uses this approach.
Buy Verified PayPal Account | Buy Google 5 Star Reviewsusawebmarket
Buy Verified PayPal Account
Looking to buy verified PayPal accounts? Discover 7 expert tips for safely purchasing a verified PayPal account in 2024. Ensure security and reliability for your transactions.
PayPal Services Features-
🟢 Email Access
🟢 Bank Added
🟢 Card Verified
🟢 Full SSN Provided
🟢 Phone Number Access
🟢 Driving License Copy
🟢 Fasted Delivery
Client Satisfaction is Our First priority. Our services is very appropriate to buy. We assume that the first-rate way to purchase our offerings is to order on the website. If you have any worry in our cooperation usually You can order us on Skype or Telegram.
24/7 Hours Reply/Please Contact
usawebmarketEmail: support@usawebmarket.com
Skype: usawebmarket
Telegram: @usawebmarket
WhatsApp: +1(218) 203-5951
USA WEB MARKET is the Best Verified PayPal, Payoneer, Cash App, Skrill, Neteller, Stripe Account and SEO, SMM Service provider.100%Satisfection granted.100% replacement Granted.
What is the TDS Return Filing Due Date for FY 2024-25.pdfseoforlegalpillers
It is crucial for the taxpayers to understand about the TDS Return Filing Due Date, so that they can fulfill your TDS obligations efficiently. Taxpayers can avoid penalties by sticking to the deadlines and by accurate filing of TDS. Timely filing of TDS will make sure about the availability of tax credits. You can also seek the professional guidance of experts like Legal Pillers for timely filing of the TDS Return.
Enterprise Excellence is Inclusive Excellence.pdfKaiNexus
Enterprise excellence and inclusive excellence are closely linked, and real-world challenges have shown that both are essential to the success of any organization. To achieve enterprise excellence, organizations must focus on improving their operations and processes while creating an inclusive environment that engages everyone. In this interactive session, the facilitator will highlight commonly established business practices and how they limit our ability to engage everyone every day. More importantly, though, participants will likely gain increased awareness of what we can do differently to maximize enterprise excellence through deliberate inclusion.
What is Enterprise Excellence?
Enterprise Excellence is a holistic approach that's aimed at achieving world-class performance across all aspects of the organization.
What might I learn?
A way to engage all in creating Inclusive Excellence. Lessons from the US military and their parallels to the story of Harry Potter. How belt systems and CI teams can destroy inclusive practices. How leadership language invites people to the party. There are three things leaders can do to engage everyone every day: maximizing psychological safety to create environments where folks learn, contribute, and challenge the status quo.
Who might benefit? Anyone and everyone leading folks from the shop floor to top floor.
Dr. William Harvey is a seasoned Operations Leader with extensive experience in chemical processing, manufacturing, and operations management. At Michelman, he currently oversees multiple sites, leading teams in strategic planning and coaching/practicing continuous improvement. William is set to start his eighth year of teaching at the University of Cincinnati where he teaches marketing, finance, and management. William holds various certifications in change management, quality, leadership, operational excellence, team building, and DiSC, among others.
Discover the innovative and creative projects that highlight my journey throu...dylandmeas
Discover the innovative and creative projects that highlight my journey through Full Sail University. Below, you’ll find a collection of my work showcasing my skills and expertise in digital marketing, event planning, and media production.
Company Valuation webinar series - Tuesday, 4 June 2024FelixPerez547899
This session provided an update as to the latest valuation data in the UK and then delved into a discussion on the upcoming election and the impacts on valuation. We finished, as always with a Q&A
The world of search engine optimization (SEO) is buzzing with discussions after Google confirmed that around 2,500 leaked internal documents related to its Search feature are indeed authentic. The revelation has sparked significant concerns within the SEO community. The leaked documents were initially reported by SEO experts Rand Fishkin and Mike King, igniting widespread analysis and discourse. For More Info:- https://news.arihantwebtech.com/search-disrupted-googles-leaked-documents-rock-the-seo-world/
Recruiting in the Digital Age: A Social Media MasterclassLuanWise
In this masterclass, presented at the Global HR Summit on 5th June 2024, Luan Wise explored the essential features of social media platforms that support talent acquisition, including LinkedIn, Facebook, Instagram, X (formerly Twitter) and TikTok.
Kseniya Leshchenko: Shared development support service model as the way to ma...Lviv Startup Club
Kseniya Leshchenko: Shared development support service model as the way to make small projects with small budgets profitable for the company (UA)
Kyiv PMDay 2024 Summer
Website – www.pmday.org
Youtube – https://www.youtube.com/startuplviv
FB – https://www.facebook.com/pmdayconference
VAT Registration Outlined In UAE: Benefits and Requirementsuae taxgpt
Vat Registration is a legal obligation for businesses meeting the threshold requirement, helping companies avoid fines and ramifications. Contact now!
https://viralsocialtrends.com/vat-registration-outlined-in-uae/
Business Valuation Principles for EntrepreneursBen Wann
This insightful presentation is designed to equip entrepreneurs with the essential knowledge and tools needed to accurately value their businesses. Understanding business valuation is crucial for making informed decisions, whether you're seeking investment, planning to sell, or simply want to gauge your company's worth.
Improving profitability for small businessBen Wann
In this comprehensive presentation, we will explore strategies and practical tips for enhancing profitability in small businesses. Tailored to meet the unique challenges faced by small enterprises, this session covers various aspects that directly impact the bottom line. Attendees will learn how to optimize operational efficiency, manage expenses, and increase revenue through innovative marketing and customer engagement techniques.
At Techbox Square, in Singapore, we're not just creative web designers and developers, we're the driving force behind your brand identity. Contact us today.
2. Content
Types of locks and system lock tables
Serializablility by Two-Phase Locking
Dealing with Deadlock and Starvation
Timestamp ordering
Validation concurrency control
3. Types of Lock
Some of the main technique used to control concurrent
execution of transaction are based on the concept of locking
data items.
Types of Lock
Binary Lock :
Shared/Exclusive ( Read/Write) Lock
4. Binary Lock
A Binary Lock can have two state or values:
Lock
Unlock
1 -> indicates locked
0 -> indicates unlocked.
5. Locking
• Locking is an operation which secures (a) permission to
Read or (b) permission to Write a data item for a
transaction.
• A distinct lock is associated with each database item x.
• A value of lock(x)=1
• A value x can not be accessed by database operation that
request the item.
• Example: Lock (X)
• Data item X is locked in behalf of the requesting
transaction.
6. Unlocking
• Unlocking is an operation which removes these
permissions from the data item
• Example: Unlock (X).
• Data item X is made available to all other transactions.
• Lock and Unlock are Atomic operations.
7. Exclusive/Shared Lock
• Two locks modes
(a) shared (read)
(b) exclusive (write)
• Shared mode: Shared lock (X).
• More than one transaction can apply share lock on X
for reading its value but no write lock can be applied on
X by any other transaction.
8. Exclusive/Shared Lock
• Exclusive mode : Write lock (X).
• Only one write lock on X can exist at any time and no
shared lock can be applied by any other transaction on X.
• If transaction have exclusive lock then no transaction
have exclusive lock on same item.
9. Lock table and Lock manager
Lock table :
The system need to maintain only these record for the item
that are concurrently locked in a Lock table.
Lock table is organize as a hash file.
Item not in lock table are consider to be unlocked.
Transaction ID Data item id lock mode Ptr to next data item
T1 X1 Read Next
Lock Manager :
Managing locks on data items.
10. Database requires that all transactions should be well-
formed.
A transaction is well-formed if:
• It must lock the data item before it reads or writes to it.
• It must not lock an already locked data items and it must
not try to unlock a free data item.
11. Lock Operation of Binary Lock
Lock_item(X) :
B:
if LOCK (X) = 0 (* item is unlocked*)
then LOCK (X) 1 (*lock the item*)
else
begin
wait (until lock (X) = 0)
the lock manager wakes up the transaction;
goto B
end;
12. unlock Operation of Binary Lock
unlock_item(X) :
LOCK (X) 0 (*unlock the item*)
if any transactions are waiting then
wake up one of the waiting the transactions;
13. Rules for transaction in binary locking scheme
1. A transaction T must issue the operation lock_item(X) before
any read_item(X) or write_item(X) operation performed in T.
2. A transaction T must issue the operation unlock_item(X)
after all read_item(X) and write_item(X) operation
completed in T.
3. A transaction T will not issue a lock_item(X) operation if it
already hold lock on item X.
4. A transaction T will not issue a unlock_item(X) operation
unless it already hold lock on item X.
14. Lock Operation of Shared Lock
read_item(X) :
B:
if LOCK (X) = “unlocked” then
begin
LOCK (X) “read-locked”;
no_of_reads (X) 1;
end
else if LOCK (X) “read-locked” then
no_of_reads (X) no_of_reads (X) +1
else
begin
wait (until LOCK (X) = “unlocked”
and the lock manager wakes up the transaction);
go to B
end;
15. Lock Operation of exclusive Lock
write_item(X) :
B:
if LOCK (X) = “unlocked” then
LOCK (X) “write-locked”;
else
begin
wait (until LOCK (X) = “unlocked”
and the lock manager wakes up the transaction);
go to B
end;
16. Unlock Operation for two-mode
Unlock(x) :
if LOCK (X) = “write-locked” then
begin
LOCK (X) “unlocked”;
wake up on of the waiting transaction, if any
end
else if LOCK (X) = “read-locked” then
begin
no_of_read(X) no_of_read(X)-1 ;
if no_of_read(X) =0 then
begin
LOCK (X) “unlocked”;
wake up on of the waiting transaction, if any
end
end;
17. Rules for transaction in shared/exclusive locking scheme
1. A transaction T must issue the operation read_lock(X) or
write_lock(X) before any read_item(X) operation
performed in T.
2. A transaction T must issue the operation write_lock(X)
before write_item(X) operation perforemed in T.
3. A transaction T must issue the operation unlock(X) after
all write_item(X) operation are completed in T.
18. Rules for transaction in shared/exclusive locking scheme
4. A transaction T will not issue a read_lock(X) operation if it
already holds a read(shared) lock or a write(exclusive)
lock on item X.
5. A transaction T will not issue a write_lock(X) operation if
it already holds a read(shared) lock or a write(exclusive)
lock on item X.
6. A transaction T will not issue an unlock(x) operation
unless it already holds a read(shared) lock or a
write(exclusive) lock on item X.
19. Serializablility by Two Phase Locking
A transaction is said to follow the two-phase locking
protocol if all locking operations (read_lock, write_lock)
precede the first unlock operation in the transaction.
Such transaction can be divided in to 2 phase
Expanding or Growing (first) Phase
Shrinking (Second) Phase
20. Serializablility by Two Phase Locking
Locking (Growing) Phase: In this phase new locks on the items
can be acquired but none can be released.
A transaction applies locks (read or write) on desired data
items one at a time.(Gain Lock)
Unlocking (Shrinking) Phase: In this phase existing lock can be
released but no new lock can be acquired.
A transaction unlocks its locked data items one at a time.(Release Lock)
Requirement: For a transaction these two phases must be mutually
exclusively, that is,
During locking phase unlocking phase must not start
During unlocking phase locking phase must not begin.
21. Serial Schedule of T1 and T2
T1 T2 Result
read_lock (Y); read_lock (X); Initial values: X=20; Y=30
read_item (Y); read_item (X); Result of serial execution
unlock (Y); unlock (X); T1 followed by T2
write_lock (X); Write_lock (Y); X=50, Y=80.
read_item (X); read_item (Y); Result of serial execution
X:=X+Y; Y:=X+Y; T2 followed by T1
write_item (X); write_item (Y); X=70, Y=50
unlock (X); unlock (Y);
22. Problem to violated to phase locking Protocol
T1 T2
Read_lock(Y)
read_item (Y);
unlock (Y); Result :
read_lock (X); X=50; Y=50
read_item (X);
unlock (X);
write_lock (Y);
Non-Serializable
read_item (Y); because it violated
Y:=X+Y; two phase policy.
write_item (Y);
unlock (Y);
write_lock (X);
read_item (X);
X:=X+Y;
write_item (X);
unlock (X)
24. Two phase locking protocols
Advantage:
It produce Serializable schedule.
Problem With two phase locking protocols
Two phase locking protocols can produce deadlock.
25. Lock conversion
Lock upgrade: existing read lock to write lock
if Ti has a read-lock (X) and Tj has no read-lock (X) (i j) then
convert read-lock (X) to write-lock (X)
else
force Ti to wait until Tj unlocks X
Lock downgrade: existing write lock to read lock
Ti has a write-lock (X) (*no transaction can have any lock on X*)
convert write-lock (X) to read-lock (X)
26. Variation of two phase locking
Two-phase policy generates two locking algorithms
Basic
Conservative.
Conservative:
Prevents deadlock by locking all desired data items before
transaction begins execution by pre-declaring its read-set and
write-set.
Deadlock free protocol
27. Terms in two-phase locking protocols
Strict 2PL :
A transaction must released all it’s exclusive lock only when it
is committed or abort.
Transaction T does not released any of its exclusive lock until
after commit or aborts.
Rigorous 2PL :
A transaction must released all it’s lock only when it’s commit
or abort.
Transaction T does not released any of its lock(exclusive or
Shared) until after commit or aborts.
It is easier to implement than strict 2PL.
28. Deadlock
Deadlock occurs when each transaction T in a set of two r
more transaction is waiting for some item that is locked by
some other transaction T’ in the set.
Hence each transaction in the set is on a waiting queue,
waiting for one of the other transaction in the set to
release the lock on an item.
29. Deadlock
T1 T2
read_lock (Y)
read_item(Y)
read_lock (X) T1 and T2 did follow two-
read_item(X)
phase policy but they are
write_lock (X)
(waits for X) deadlock
write_lock (Y);
(waits for Y)
30. 3. Dealing with Deadlock
There are several ways to dealing with deadlock
Deadlock prevention
Deadlock detection
Prevent Starvation
31. Deadlock prevention
Deadlock prevention protocols ensure that the system
will never enter into a deadlock state.
Some prevention strategies :
1. Require that each transaction locks all its data items
before it begins execution (pre-declaration).
The conservative two-phase locking uses this approach
2. On the basis of transaction timestamp TS(T)
32. Transaction Timestamp TP(S)
Transaction timestamp is a unique identifier assigned to
each transaction.
It is based on the order in which transaction are started.
If transaction T1 starts before transaction T2 then
TS(T1 ) < TS(T2)
Older transaction has smaller timestamp value.
Two scheme that prevent deadlock
1. Wait-Die
2. Wound-Wait
33. Deadlock prevention Scheme.
wait-die scheme — non-preemptive
If TS(i)< TS(j), then (Ti older than Tj)
Ti allowed to wait;
otherwise (Ti younger than Tj)
abort Ti(Ti dies) and
restart it later with the same timestamp.
Older transaction may wait for younger one to release data
item. Younger transactions never wait for older ones; they
are rolled back instead.
A transaction may die several times before acquiring
needed data item
34. wound-wait scheme — preemptive
If TS(i)< TS(j), then (Ti older than Tj)
abort Tj (Ti wounds Tj)
restart it later with the same timestamp.
otherwise (Ti younger than Tj)
Ti allowed to wait
older transaction wounds (forces rollback) of younger
transaction instead of waiting for it. Younger transactions
may wait for older ones.
may be fewer rollbacks than wait-die scheme.
35. Deadlock detection and resolution
In this approach, deadlocks are allowed to happen.
The scheduler maintains a wait-for-graph for detecting cycle.
If a cycle exists, then one transaction involved in the cycle is selected
(victim) and rolled-back.
A wait-for-graph is created using the lock table.
As soon as a transaction is blocked, it is added to the graph. When a
chain like:
Ti waits for Tj waits for Tk waits for Ti or Tj occurs, then this creates a
cycle.
One of the transaction of the cycle is selected and rolled back.
36. Starvation
Starvation :it occurs when a transaction cannot proceed for
an indefinite period of time while other transaction in the
system continue normally.
This may occur if the waiting scheme for locked items is
unfair.
Solution of Starvation :
First come first served
Based on priority
But increased the priority of the transaction the longer it
waits. until it get highest priority.
37. Concurrency control based on timestamp ordering
Timestamp
Transaction timestamp is a unique identifier assigned to
each transaction.
It is based on the order in which transaction are started.
A larger timestamp value indicates a more recent event or
operation.
Timestamp based algorithm uses timestamp to serialize the
execution of concurrent transactions.
38. Timestamp ordering algorithm
Timestamp Ordering : A schedule in which the transaction
participate is then Serializable and equivalent serial schedule
has the transaction in order of their timestamp value this is
called timestamp ordering.
order of accessed item that does not violate serializablility
order, for that algorithm associated with each database item X
is used.
39. read_TS(X)
The read timestamp of item X; this is largest timestamp
among all the timestamp of transaction that have
successfully read item X.
read_TS(X)=TS(T)
Where T is the youngest transaction that has read X successfully.
write_TS(X)
The write timestamp of item X; this is largest timestamp
among all the timestamp of transaction that have
successfully written item X.
weite_TS(X)=TS(T)
Where T is the youngest transaction that has written X successfully.
40. Timestamp based concurrency control
algorithm
Basic Timestamp Ordering
1. Transaction T issues a write_item(X) operation:
a. If read_TS(X) > TS(T) or if write_TS(X) > TS(T), then
abort and roll-back T and reject the operation.
(younger transaction has already read the data item)
b. If the condition in part (a) does not exist, then
execute write_item(X) of T and set write_TS(X) to TS(T).
41. Timestamp based concurrency control
algorithm
Basic Timestamp Ordering
2. Transaction T issues a read_item(X) operation:
a. If write_TS(X) > TS(T), then
abort and roll-back T and reject the operation.
(younger transaction has already written to the data item )
b. If write_TS(X) TS(T), then
execute read_item(X) of T and set read_TS(X) to the larger of
TS(T) and the current read_TS(X).
42. Advantage :
Basic TO always produce conflict Serializable schedule.
Deadlock does not occur.
Problem with Basic TO
Cyclic restart may occur if a transaction is continually aborted
and restarted.
A Modification of Basic TO algorithm is known as Thomas’s
write rule.
It does not enforce conflict serializability
But it reject fewer write operation by modifying the checks for
the write_item(X) operation.
43. Timestamp based concurrency control
algorithm
Thomas’s Write Rule
1. If read_TS(X) > TS(T) then abort and roll-back T and reject
the operation.
2. If write_TS(X) > TS(T), then just ignore the write operation
and continue execution. This is because the most recent
writes counts in case of two consecutive writes.
3. If the conditions given in 1 and 2 above do not occur, then
execute write_item(X) of T and set write_TS(X) to TS(T).
44. Validation concurrency control techniques
optimistic concurrency control technique (validation or
certification technique)
No checking is done while the transaction is executing.
It follows some scheme.
In this scheme , updation in the transaction are not applied
directly to the database item until the transaction reaches it end.
All updation applied to local copies of data item that are kept for
transaction.
At the end of transaction, concurrency control phases checks
whether any of transaction’s updates violates serializability or not.
45. Three phases of concurrency control protocol
Read Phase:
A transaction can read values of committed data items from the
database.
However , updation are applied only to local copies of data items.
Validation Phase :
Checking is performed to ensure that serializability will not be
violated if transaction updates are applied to the database.
Write Phase
If validation phase is successful, the transaction updates are
applied to the database;
Otherwise , the updates are discarded and the transaction is
restarted .
46. Validation Phase
This phase for Ti checks that, for each transaction Tj that is either
committed or is in its validation phase, one of the following conditions
holds:
1. Tj completes its write phase before Ti starts its read phase.
2. Ti starts its write phase after Tj completes its write phase,
and the read_set of Ti has no items in common with the
write_set of Tj
3. Both the read_set and write_set of Ti have no items in
common with the write_set of Tj, and Tj completes its end
phase.