SlideShare a Scribd company logo
1 of 10
RECOVERY WITH CONCURRENT
TRANSACTION
PRESENTED BY
M . LAVANYA
M.Sc(CS & IT)
NADAR SARASWATHI COLLEGE OF ARTS &SCIENCE
VADAPUDUPATTI , THENI.
INTRODUCTION
• Recovery in a single transaction at a time is executing
• We can modify and extend the log-based recovery scheme
with multiple concurrent transactions.
• The system has a single disk buffer and a single log.
• Immediate update and permit a buffer block to update the data
item.
INTERACTION WITH CONCURRENCY
CONTROL
• Concurrency control using strict two-phase locking:
how to perform undo if updates A , then t2 updates A and commits and
finally t1 h as to abort.
• Logging is done as
log records of different transactions may be interspersed in the log .
• The check pointing techniques and actions taken on recovery have to
be changed
several transactions may be active when a check point is performed.
Transaction Rollback
• Roll back a failed transaction, Ti, by using the log. The system scans
the log back- ward; for every log record of the form <Ti, Xj , V1, V2>
found in the log, the system restores the data item Xj to its old value
V1.
• Scanning of the log terminates when the log record <Ti, start> is found.
• Scanning the log backward is important, since a transaction may have
updated a data item more than once. As an illustration, consider the pair
of log records
<Ti, A, 10, 20>
<Ti, A, 20, 30>
Checkpoints
checkpoints to reduce the number of log records that the
system must scan when it recovers from a crash. Since we
assumed no concurrency, it was necessary to consider only the
following transactions during recovery:
• Those transactions that started after the most recent
checkpoint
• The one transaction, if any, that was active at the time of the
most recent check- point
• In a concurrent transaction-processing system, we require that
the checkpoint log record be of the form <checkpoint L>,
where L is a list of transactions active at the time of the
checkpoint.
• The requirement that transactions must not perform any
updates to buffer blocks or to the log during check pointing.
• A fuzzy checkpoint is a check- point where transactions are
allowed to perform updates even while buffer blocks
• The system constructs the two lists as follows: Initially, they
are both empty. The system scans the log backward, examining
each record, until it find the first.
<checkpoint> record:
• For each record found of the form <Ti commit>, it adds Ti to
redo-list.
• For each record found of the form <Ti start>, if Ti is not in
redo-list, then it adds Ti to undo-list.
The recovery proceeds as follows:
1. The system rescans the log from the most recent record
backward, and per- forms an undo for each log record that
belongs transaction Ti on the undo-list.
2. The system locates the most recent <checkpoint L> record on
the log. Notice that this step may involve scanning the log
forward, if the checkpoint record was passed in step 1.
3. The system scans the log forward from the most recent
<checkpoint L> record, and performs redo for each log record
that belongs to a transaction Ti that is on the redo-list.
• It is important to undo the transaction in the undo-list before redoing
transactions in the redo-list, using the algorithm in steps 1 to 3;
otherwise, a problem may occur. Suppose that data item A initially
has the value 10.
• another transaction Tj then updated data item A to 30 and
committed, following which the system crashed. The state of the log
at the time of the crash is
<Ti, A, 10, 20>
<Tj , A, 10, 30>
<Tj commit>
Recovery with concurrent transaction

More Related Content

What's hot

16. Concurrency Control in DBMS
16. Concurrency Control in DBMS16. Concurrency Control in DBMS
16. Concurrency Control in DBMSkoolkampus
 
Concurrency Control Techniques
Concurrency Control TechniquesConcurrency Control Techniques
Concurrency Control TechniquesRaj vardhan
 
Introduction to distributed file systems
Introduction to distributed file systemsIntroduction to distributed file systems
Introduction to distributed file systemsViet-Trung TRAN
 
Validation based protocol
Validation based protocolValidation based protocol
Validation based protocolBBDITM LUCKNOW
 
15. Transactions in DBMS
15. Transactions in DBMS15. Transactions in DBMS
15. Transactions in DBMSkoolkampus
 
Principle source of optimazation
Principle source of optimazationPrinciple source of optimazation
Principle source of optimazationSiva Sathya
 
Structure of the page table
Structure of the page tableStructure of the page table
Structure of the page tableduvvuru madhuri
 
Two phase commit protocol in dbms
Two phase commit protocol in dbmsTwo phase commit protocol in dbms
Two phase commit protocol in dbmsDilouar Hossain
 
BackTracking Algorithm: Technique and Examples
BackTracking Algorithm: Technique and ExamplesBackTracking Algorithm: Technique and Examples
BackTracking Algorithm: Technique and ExamplesFahim Ferdous
 
Congetion Control.pptx
Congetion Control.pptxCongetion Control.pptx
Congetion Control.pptxNaveen Dubey
 
Optimization of basic blocks
Optimization of basic blocksOptimization of basic blocks
Optimization of basic blocksishwarya516
 
Concurrent transactions
Concurrent transactionsConcurrent transactions
Concurrent transactionsSajan Sahu
 
Peephole optimization techniques in compiler design
Peephole optimization techniques in compiler designPeephole optimization techniques in compiler design
Peephole optimization techniques in compiler designAnul Chaudhary
 

What's hot (20)

Deadlock dbms
Deadlock dbmsDeadlock dbms
Deadlock dbms
 
16. Concurrency Control in DBMS
16. Concurrency Control in DBMS16. Concurrency Control in DBMS
16. Concurrency Control in DBMS
 
Concurrency Control Techniques
Concurrency Control TechniquesConcurrency Control Techniques
Concurrency Control Techniques
 
Introduction to distributed file systems
Introduction to distributed file systemsIntroduction to distributed file systems
Introduction to distributed file systems
 
Validation based protocol
Validation based protocolValidation based protocol
Validation based protocol
 
concurrency-control
concurrency-controlconcurrency-control
concurrency-control
 
15. Transactions in DBMS
15. Transactions in DBMS15. Transactions in DBMS
15. Transactions in DBMS
 
Principle source of optimazation
Principle source of optimazationPrinciple source of optimazation
Principle source of optimazation
 
Structure of the page table
Structure of the page tableStructure of the page table
Structure of the page table
 
Concurrency control
Concurrency controlConcurrency control
Concurrency control
 
Two phase commit protocol in dbms
Two phase commit protocol in dbmsTwo phase commit protocol in dbms
Two phase commit protocol in dbms
 
BackTracking Algorithm: Technique and Examples
BackTracking Algorithm: Technique and ExamplesBackTracking Algorithm: Technique and Examples
BackTracking Algorithm: Technique and Examples
 
Timestamp protocols
Timestamp protocolsTimestamp protocols
Timestamp protocols
 
Run time storage
Run time storageRun time storage
Run time storage
 
Congetion Control.pptx
Congetion Control.pptxCongetion Control.pptx
Congetion Control.pptx
 
Optimization of basic blocks
Optimization of basic blocksOptimization of basic blocks
Optimization of basic blocks
 
Concurrent transactions
Concurrent transactionsConcurrent transactions
Concurrent transactions
 
Unit 2 in daa
Unit 2 in daaUnit 2 in daa
Unit 2 in daa
 
Peephole optimization techniques in compiler design
Peephole optimization techniques in compiler designPeephole optimization techniques in compiler design
Peephole optimization techniques in compiler design
 
Parse Tree
Parse TreeParse Tree
Parse Tree
 

Similar to Recovery with concurrent transaction

Relational Database Management System
Relational Database Management SystemRelational Database Management System
Relational Database Management Systemsweetysweety8
 
DBMS-Recovery techniques dfggrjfchdfhwrshfxbvdgtytdfx.pptx
DBMS-Recovery techniques dfggrjfchdfhwrshfxbvdgtytdfx.pptxDBMS-Recovery techniques dfggrjfchdfhwrshfxbvdgtytdfx.pptx
DBMS-Recovery techniques dfggrjfchdfhwrshfxbvdgtytdfx.pptxHemaSenthil5
 
Recovery System.pptx
Recovery System.pptxRecovery System.pptx
Recovery System.pptxssuserfb9a21
 
UNIT 4- CRASH AND RECOVERY.pdf
UNIT 4- CRASH AND RECOVERY.pdfUNIT 4- CRASH AND RECOVERY.pdf
UNIT 4- CRASH AND RECOVERY.pdfKavitaShinde26
 
Adbms 34 transaction processing and recovery
Adbms 34 transaction processing and recoveryAdbms 34 transaction processing and recovery
Adbms 34 transaction processing and recoveryVaibhav Khanna
 
Databases: Backup and Recovery
Databases: Backup and RecoveryDatabases: Backup and Recovery
Databases: Backup and RecoveryDamian T. Gordon
 
Introduction to transaction processing concepts and theory
Introduction to transaction processing concepts and theoryIntroduction to transaction processing concepts and theory
Introduction to transaction processing concepts and theoryZainab Almugbel
 
CS 542 -- Failure Recovery, Concurrency Control
CS 542 -- Failure Recovery, Concurrency ControlCS 542 -- Failure Recovery, Concurrency Control
CS 542 -- Failure Recovery, Concurrency ControlJ Singh
 
Dbms ii mca-ch11-recovery-2013
Dbms ii mca-ch11-recovery-2013Dbms ii mca-ch11-recovery-2013
Dbms ii mca-ch11-recovery-2013Prosanta Ghosh
 
recovery system
recovery systemrecovery system
recovery systemshreeuva
 

Similar to Recovery with concurrent transaction (20)

Relational Database Management System
Relational Database Management SystemRelational Database Management System
Relational Database Management System
 
Assignment#13
Assignment#13Assignment#13
Assignment#13
 
DBMS-Recovery techniques dfggrjfchdfhwrshfxbvdgtytdfx.pptx
DBMS-Recovery techniques dfggrjfchdfhwrshfxbvdgtytdfx.pptxDBMS-Recovery techniques dfggrjfchdfhwrshfxbvdgtytdfx.pptx
DBMS-Recovery techniques dfggrjfchdfhwrshfxbvdgtytdfx.pptx
 
Unit07 dbms
Unit07 dbmsUnit07 dbms
Unit07 dbms
 
Recovery System.pptx
Recovery System.pptxRecovery System.pptx
Recovery System.pptx
 
Assignment#14
Assignment#14Assignment#14
Assignment#14
 
UNIT 4- CRASH AND RECOVERY.pdf
UNIT 4- CRASH AND RECOVERY.pdfUNIT 4- CRASH AND RECOVERY.pdf
UNIT 4- CRASH AND RECOVERY.pdf
 
Unit 5 dbms
Unit 5 dbmsUnit 5 dbms
Unit 5 dbms
 
Adbms 34 transaction processing and recovery
Adbms 34 transaction processing and recoveryAdbms 34 transaction processing and recovery
Adbms 34 transaction processing and recovery
 
Unit 07 dbms
Unit 07 dbmsUnit 07 dbms
Unit 07 dbms
 
Databases: Backup and Recovery
Databases: Backup and RecoveryDatabases: Backup and Recovery
Databases: Backup and Recovery
 
DBMS UNIT 5 CHAPTER 3.ppt
DBMS UNIT 5 CHAPTER 3.pptDBMS UNIT 5 CHAPTER 3.ppt
DBMS UNIT 5 CHAPTER 3.ppt
 
transaction_processing.ppt
transaction_processing.ppttransaction_processing.ppt
transaction_processing.ppt
 
Introduction to transaction processing concepts and theory
Introduction to transaction processing concepts and theoryIntroduction to transaction processing concepts and theory
Introduction to transaction processing concepts and theory
 
Unit 4 dbms
Unit 4 dbmsUnit 4 dbms
Unit 4 dbms
 
CS 542 -- Failure Recovery, Concurrency Control
CS 542 -- Failure Recovery, Concurrency ControlCS 542 -- Failure Recovery, Concurrency Control
CS 542 -- Failure Recovery, Concurrency Control
 
Dbms
DbmsDbms
Dbms
 
Dbms ii mca-ch11-recovery-2013
Dbms ii mca-ch11-recovery-2013Dbms ii mca-ch11-recovery-2013
Dbms ii mca-ch11-recovery-2013
 
Transaction Processing in DBMS.pptx
Transaction Processing in DBMS.pptxTransaction Processing in DBMS.pptx
Transaction Processing in DBMS.pptx
 
recovery system
recovery systemrecovery system
recovery system
 

More from lavanya marichamy

Network design consideration
Network design considerationNetwork design consideration
Network design considerationlavanya marichamy
 
Data structure - traveling sales person and mesh algorithm
Data structure - traveling sales person and mesh algorithmData structure - traveling sales person and mesh algorithm
Data structure - traveling sales person and mesh algorithmlavanya marichamy
 
Fundamentals and image compression models
Fundamentals and image compression modelsFundamentals and image compression models
Fundamentals and image compression modelslavanya marichamy
 
Software requirements specification
Software requirements specificationSoftware requirements specification
Software requirements specificationlavanya marichamy
 
Query evaluation and optimization
Query evaluation and optimizationQuery evaluation and optimization
Query evaluation and optimizationlavanya marichamy
 
Basic Computer Organisation And Design
Basic Computer Organisation And DesignBasic Computer Organisation And Design
Basic Computer Organisation And Designlavanya marichamy
 
Register Transfer Language,Bus and Memory Transfer
Register Transfer Language,Bus and Memory TransferRegister Transfer Language,Bus and Memory Transfer
Register Transfer Language,Bus and Memory Transferlavanya marichamy
 
Dynamic memory allocation in c
Dynamic memory allocation in cDynamic memory allocation in c
Dynamic memory allocation in clavanya marichamy
 
microcomputer architecture-Instruction formats
microcomputer architecture-Instruction formatsmicrocomputer architecture-Instruction formats
microcomputer architecture-Instruction formatslavanya marichamy
 

More from lavanya marichamy (17)

Digital video
Digital videoDigital video
Digital video
 
Network design consideration
Network design considerationNetwork design consideration
Network design consideration
 
Java servlets and CGI
Java servlets and CGIJava servlets and CGI
Java servlets and CGI
 
Data structure - traveling sales person and mesh algorithm
Data structure - traveling sales person and mesh algorithmData structure - traveling sales person and mesh algorithm
Data structure - traveling sales person and mesh algorithm
 
Fundamentals and image compression models
Fundamentals and image compression modelsFundamentals and image compression models
Fundamentals and image compression models
 
Software requirements specification
Software requirements specificationSoftware requirements specification
Software requirements specification
 
Data mining primitives
Data mining primitivesData mining primitives
Data mining primitives
 
Memory Management
Memory ManagementMemory Management
Memory Management
 
Query evaluation and optimization
Query evaluation and optimizationQuery evaluation and optimization
Query evaluation and optimization
 
Basic Computer Organisation And Design
Basic Computer Organisation And DesignBasic Computer Organisation And Design
Basic Computer Organisation And Design
 
Register Transfer Language,Bus and Memory Transfer
Register Transfer Language,Bus and Memory TransferRegister Transfer Language,Bus and Memory Transfer
Register Transfer Language,Bus and Memory Transfer
 
Arithmetic micro operations
Arithmetic micro operationsArithmetic micro operations
Arithmetic micro operations
 
Pointer in c
Pointer in cPointer in c
Pointer in c
 
Dynamic memory allocation in c
Dynamic memory allocation in cDynamic memory allocation in c
Dynamic memory allocation in c
 
microcomputer architecture-Instruction formats
microcomputer architecture-Instruction formatsmicrocomputer architecture-Instruction formats
microcomputer architecture-Instruction formats
 
IEEE STANDARED 802.5 LAN
IEEE STANDARED 802.5 LANIEEE STANDARED 802.5 LAN
IEEE STANDARED 802.5 LAN
 
Broadband isdn and atm
Broadband  isdn and atmBroadband  isdn and atm
Broadband isdn and atm
 

Recently uploaded

Gas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptxGas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptxDr.Ibrahim Hassaan
 
ENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choomENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choomnelietumpap1
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfLike-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfMr Bounab Samir
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Celine George
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxiammrhaywood
 
Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Mark Reed
 
Hierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of managementHierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of managementmkooblal
 
Judging the Relevance and worth of ideas part 2.pptx
Judging the Relevance  and worth of ideas part 2.pptxJudging the Relevance  and worth of ideas part 2.pptx
Judging the Relevance and worth of ideas part 2.pptxSherlyMaeNeri
 
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxEPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxRaymartEstabillo3
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxpboyjonauth
 
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdfFraming an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdfUjwalaBharambe
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
 
ACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfSpandanaRallapalli
 
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxMULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxAnupkumar Sharma
 
AmericanHighSchoolsprezentacijaoskolama.
AmericanHighSchoolsprezentacijaoskolama.AmericanHighSchoolsprezentacijaoskolama.
AmericanHighSchoolsprezentacijaoskolama.arsicmarija21
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPCeline George
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxthorishapillay1
 

Recently uploaded (20)

Gas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptxGas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptx
 
ENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choomENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choom
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
 
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfLike-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
 
Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)
 
Hierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of managementHierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of management
 
Judging the Relevance and worth of ideas part 2.pptx
Judging the Relevance  and worth of ideas part 2.pptxJudging the Relevance  and worth of ideas part 2.pptx
Judging the Relevance and worth of ideas part 2.pptx
 
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxEPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptx
 
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdfFraming an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
 
OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...
 
ACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdf
 
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
 
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxMULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
 
AmericanHighSchoolsprezentacijaoskolama.
AmericanHighSchoolsprezentacijaoskolama.AmericanHighSchoolsprezentacijaoskolama.
AmericanHighSchoolsprezentacijaoskolama.
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERP
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptx
 

Recovery with concurrent transaction

  • 1. RECOVERY WITH CONCURRENT TRANSACTION PRESENTED BY M . LAVANYA M.Sc(CS & IT) NADAR SARASWATHI COLLEGE OF ARTS &SCIENCE VADAPUDUPATTI , THENI.
  • 2. INTRODUCTION • Recovery in a single transaction at a time is executing • We can modify and extend the log-based recovery scheme with multiple concurrent transactions. • The system has a single disk buffer and a single log. • Immediate update and permit a buffer block to update the data item.
  • 3. INTERACTION WITH CONCURRENCY CONTROL • Concurrency control using strict two-phase locking: how to perform undo if updates A , then t2 updates A and commits and finally t1 h as to abort. • Logging is done as log records of different transactions may be interspersed in the log . • The check pointing techniques and actions taken on recovery have to be changed several transactions may be active when a check point is performed.
  • 4. Transaction Rollback • Roll back a failed transaction, Ti, by using the log. The system scans the log back- ward; for every log record of the form <Ti, Xj , V1, V2> found in the log, the system restores the data item Xj to its old value V1. • Scanning of the log terminates when the log record <Ti, start> is found. • Scanning the log backward is important, since a transaction may have updated a data item more than once. As an illustration, consider the pair of log records <Ti, A, 10, 20> <Ti, A, 20, 30>
  • 5. Checkpoints checkpoints to reduce the number of log records that the system must scan when it recovers from a crash. Since we assumed no concurrency, it was necessary to consider only the following transactions during recovery: • Those transactions that started after the most recent checkpoint • The one transaction, if any, that was active at the time of the most recent check- point
  • 6. • In a concurrent transaction-processing system, we require that the checkpoint log record be of the form <checkpoint L>, where L is a list of transactions active at the time of the checkpoint. • The requirement that transactions must not perform any updates to buffer blocks or to the log during check pointing. • A fuzzy checkpoint is a check- point where transactions are allowed to perform updates even while buffer blocks
  • 7. • The system constructs the two lists as follows: Initially, they are both empty. The system scans the log backward, examining each record, until it find the first. <checkpoint> record: • For each record found of the form <Ti commit>, it adds Ti to redo-list. • For each record found of the form <Ti start>, if Ti is not in redo-list, then it adds Ti to undo-list.
  • 8. The recovery proceeds as follows: 1. The system rescans the log from the most recent record backward, and per- forms an undo for each log record that belongs transaction Ti on the undo-list. 2. The system locates the most recent <checkpoint L> record on the log. Notice that this step may involve scanning the log forward, if the checkpoint record was passed in step 1. 3. The system scans the log forward from the most recent <checkpoint L> record, and performs redo for each log record that belongs to a transaction Ti that is on the redo-list.
  • 9. • It is important to undo the transaction in the undo-list before redoing transactions in the redo-list, using the algorithm in steps 1 to 3; otherwise, a problem may occur. Suppose that data item A initially has the value 10. • another transaction Tj then updated data item A to 30 and committed, following which the system crashed. The state of the log at the time of the crash is <Ti, A, 10, 20> <Tj , A, 10, 30> <Tj commit>