Joonwon Lee Recovery. Lightweight Recoverable Virtual Memory Rio Vista.

Slides:



Advertisements
Similar presentations
Remus: High Availability via Asynchronous Virtual Machine Replication
Advertisements

Chapter 16: Recovery System
Recovery Failure of a site/node in a distributed system causes inconsistencies in the state of the system. Recovery: bringing back the failed node in step.
1 CSIS 7102 Spring 2004 Lecture 9: Recovery (approaches) Dr. King-Ip Lin.
Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide
1 CSIS 7102 Spring 2004 Lecture 8: Recovery (overview) Dr. King-Ip Lin.
Recovery CPSC 356 Database Ellen Walker Hiram College (Includes figures from Database Systems by Connolly & Begg, © Addison Wesley 2002)
Chapter 19 Database Recovery Techniques
Jan. 2014Dr. Yangjun Chen ACS Database recovery techniques (Ch. 21, 3 rd ed. – Ch. 19, 4 th and 5 th ed. – Ch. 23, 6 th ed.)
Chapter 11: File System Implementation
Recovery 10/18/05. Implementing atomicity Note, when a transaction commits, the portion of the system implementing durability ensures the transaction’s.
ICS (072)Database Recovery1 Database Recovery Concepts and Techniques Dr. Muhammad Shafique.
Recovery Fall 2006McFadyen Concepts Failures are either: catastrophic to recover one restores the database using a past copy, followed by redoing.
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 23 Database Recovery Techniques.
CS-550 (M.Soneru): Recovery [SaS] 1 Recovery. CS-550 (M.Soneru): Recovery [SaS] 2 Recovery Computer system recovery: –Restore the system to a normal operational.
Chapter 19 Database Recovery Techniques. Slide Chapter 19 Outline Databases Recovery 1. Purpose of Database Recovery 2. Types of Failure 3. Transaction.
Recovery Basics. Types of Recovery Catastrophic – disk crash –Backup from tape; redo from log Non-catastrophic: inconsistent state –Undo some operations.
Academic Year 2014 Spring. MODULE CC3005NI: Advanced Database Systems “DATABASE RECOVERY” (PART – 1) Academic Year 2014 Spring.
A Survey of Rollback-Recovery Protocols in Message-Passing Systems M. Elnozahy, L. Alvisi, Y. Wang, D. Johnson Carnegie Mellon University Presented by:
Highly Available ACID Memory Vijayshankar Raman. Introduction §Why ACID memory? l non-database apps: want updates to critical data to be atomic and persistent.
Distributed Deadlocks and Transaction Recovery.
Chapter 19 Recovery and Fault Tolerance Copyright © 2008.
Switch off your Mobiles Phones or Change Profile to Silent Mode.
Chapter 15 Recovery. Topics in this Chapter Transactions Transaction Recovery System Recovery Media Recovery Two-Phase Commit SQL Facilities.
Lecture 12 Recoverability and failure. 2 Optimistic Techniques Based on assumption that conflict is rare and more efficient to let transactions proceed.
Recovery Chapter 6.3 V3.1 Napier University Dr Gordon Russell.
Recovery System By Dr.S.Sridhar, Ph.D.(JNUD), RACI(Paris, NICE), RMR(USA), RZFM(Germany) DIRECTOR ARUNAI ENGINEERING COLLEGE TIRUVANNAMALAI.
12. Recovery Study Meeting M1 Yuuki Horita 2004/5/14.
1 File Systems: Consistency Issues. 2 File Systems: Consistency Issues File systems maintains many data structures  Free list/bit vector  Directories.
Reliability and Recovery CS Introduction to Operating Systems.
1 How can several users access and update the information at the same time? Real world results Model Database system Physical database Database management.
CSCI Recovery Control Techniques 1 RECOVERY CONTROL TECHNIQUES Dr. Awad Khalil Computer Science Department AUC.
Process Architecture Process Architecture - A portion of a program that can run independently of and concurrently with other portions of the program. Some.
Chapter 10 Recovery System. ACID Properties  Atomicity. Either all operations of the transaction are properly reflected in the database or none are.
Carnegie Mellon Carnegie Mellon Univ. Dept. of Computer Science Database Applications C. Faloutsos Recovery.
Section 06 (a)RDBMS (a) Supplement RDBMS Issues 2 HSQ - DATABASES & SQL And Franchise Colleges By MANSHA NAWAZ.
Academic Year 2014 Spring. MODULE CC3005NI: Advanced Database Systems “DATABASE RECOVERY” (PART – 2) Academic Year 2014 Spring.
Recovery technique. Recovery concept Recovery from transactions failure mean data restored to the most recent consistent state just before the time of.
Transactional Recovery and Checkpoints. Difference How is this different from schedule recovery? It is the details to implementing schedule recovery –It.
Database Recovery Zheng (Godric) Gu. Transaction Concept Storage Structure Failure Classification Log-Based Recovery Deferred Database Modification Immediate.
Computer Science Lecture 19, page 1 CS677: Distributed OS Last Class: Fault tolerance Reliable communication –One-one communication –One-many communication.
1 Fault Tolerance and Recovery Mostly taken from
Recovery Techniques 1.Recovery concepts 2.Recovery techniques based on Deferred Update –No-UNDO/REDO 3.Recovery techniques based on Immediate Update –UNDO/REDO.
Free Transactions with Rio Vista Landon Cox April 15, 2016.
Jun-Ki Min. Slide Purpose of Database Recovery ◦ To bring the database into the last consistent stat e, which existed prior to the failure. ◦
Operating System Reliability Andy Wang COP 5611 Advanced Operating Systems.
File System Consistency

Database recovery techniques
Database Recovery Techniques
Database Recovery Techniques
DURABILITY OF TRANSACTIONS AND CRASH RECOVERY
Free Transactions with Rio Vista
File Processing : Recovery
Operating System Reliability
Operating System Reliability
Database Backup And Recovery
Introduction to Operating Systems
Page Replacement.
Operating System Reliability
Operating System Reliability
Free Transactions with Rio Vista
Printed on Monday, December 31, 2018 at 2:03 PM.
Recovery System.
Operating System Reliability
Database Recovery 1 Purpose of Database Recovery
Transactions in Distributed Systems
Recovery Unit 4.4 Dr Gordon Russell, Napier University
Operating System Reliability
Operating System Reliability
Presentation transcript:

Joonwon Lee Recovery

Lightweight Recoverable Virtual Memory Rio Vista

Introduction failure – when a system does not perform in the manner defined erroneous state – state that could lead the system to the failure fault – anomalous physical condition – causes design/manufacturing error damage/fatigue external disturbance faults lead the system to an erroneous state which may or may not results in a failure

Failures process failure – deadlock, timeout, protection violation,... – OS should confine this failure to the process system failure – software and hardware – amnesia failure: cannot recover the state just before the failure – pause failure: the state can be reinstated – halting failure: the system never restarts disk failure – serious problem when it is the last backup storage – usually backed up by tape OR – mirrored (it will enhance read throughput anyway) communication medium failure – does not cause total system failure

Error Recovery Forward Error Recovery –allow the process to proceed after fixing errors –difficult to remove all the errors (in software, procedures to cope with all kinds of error should be prepared, which is almost impossible) Backward Error Recovery –the process should restart from the saved (or predefined) state –roll-back mechanism is needed –easy to cope with any kind of errors (it is not necessary to anticipate all kinds of errors) –overhead to restore previous state checkpointing is needed –same error may occur again

Backward Error Recovery Operation-based approach –using a log, undo(roll-back) what has been done until an error-free state can be restored –write ahead log (for a write to X) records in a log new value of X updates X State-based approach –checkpoint a complete state of a process at crash, rollback to the most recent safe state –needs many checkpoints –shadow page copy of a page that is to be updated updates are done only on the original page at crash, goes back to the shadow page at commit, keep using the original page

Issues in Recovery(1) failure and recovery of a process affect other processes that exchange data with the failed process orphan message – when a process rolls back to the point before sending out a message – actions of other processes depending on the orphan message should be rolled back, too (domino effects) lost message – node Y receives a message from X – Y rolls back to the point before receiving the message – effects are the same as when the message is lost

Issues in Recovery(2) livelocks  Y sends out m1 and receives an orphan message n1, and rolls back  m1 becomes an orphan message  receiving m1, X rolls back X Y x x m1 n1 1. failure, and roll back 2. orphan message, roll back

Checkpoints local checkpoint –snapshot of a single node –superscalar CPU and out-of-order memory operations made checkpointing difficult global checkpoint –strongly consistent set of checkpoints all the checkpoints are inside a given interval no information is exchanged between any processes during this interval this is the last place any process should rolls back to

Checkpoints(2) –consistent set of checkpoints a message recorder as “received” in a checkpoint should be recorded as “sent” in another checkpoint –no orphan message recorded as “sent” may NOT be recorded as “received” in other checkpoint –possible lost message simple to make this set –take a checkpoint after sending every message –or after sending N messages for better efficiency but at more chances of domino effect lost message can be dealt as in other network protocols

Synchronous Checkpointing Assumption –FIFO delivery of messages –no lost message Operations –an initiating node P broadcasts a message –all the other node take temporary checkpoints if necessary reply OK to the P do not send any message until they hear from P –P broadcasts either GO: if all the nodes reply OK to P Fail: otherwise –Nodes make the temporary checkpoint permanent or discard it start to send messages from this point

Synchronous Checkpointing advantages –east recovery: all processes restarts from the checkpoint disadvantages –message overhead –hinder normal progress (no computational messages are allowed during checkpointing)

Asynchronous Checkpointing checkpoint at each node is made independently –no guarantee of consistent set –recovery is complex to find the nearest consistent set optimization: all incoming messages are logged after checkpoint –recovery algorithm analyzes the log and find the most recent consistent set of checkpoints

Asynchronous Checkpointing(2) –Y crashes Y restarts from the last checkpoint send ROLLBACK(Y,2) to X since the last checkpoint records that Y has sent 2 msgs to X ROLLBACK(Y,1) to Z (red lines) –other nodes sends back ROLLBACK msgs similarly (blue lines) X sends out (X,2), (X,0) to Y and Z, respectively –each node sets the chkpnt as to prevent orphan msgs (red brackets) number of received msg from i recorded in the chkpnt < N, where ROLLBACK(i,N) msg has arrived –loop until a consistent set of checkpoints comes up bounded by N (?) X Y x Z [ [ [ [ [

Free Transactions with Rio Vista crash taxonomy –hardware: not frequent –software: frequent due to bugs in OS –power: UPS motivations –transactions are useful but high overhead (disk accesses) –file cache is useful, but vulnerable to system crashes

Traditional Approach: RVM at the beginning of a transaction, RVM copies the page to undo log(shadow page) –user abort is serviced by the undo log at commit, RVM reclaims undo space, and writes updated pages to redo log on disk –system/process failure is serviced by the redo log at leisure time, database is updated from the redo log

Rio file cache protect cached data from system crashes –cache is as reliable as a disk –then, write ahead log for recovery is not needed –writes to disk can be delayed infinitely OS errors can corrupt any part of the system –the issue is how to reduce the chances at a crash –warm reboot process writes the cache to disk

file cache vs disk why people view memory more vulnerable than disk? –memory access is a simple write an error in the address bits will overwrite the file cache –interface to access disk is complex and explicit hardware controller is accessed only through device driver calls to device drivers are checked for their arguments it is extremely unlikely that accidental errors can forge the logic of device driver

How to protect from system crashes? prevent OS from accidentally overwriting the file cache virtual memory mapping –turn off the write-permission bits in the page table for the pages in the file cache –unauthorized accesses will encounter protection violation –file cache module enables the bit before writing and disables the bit afterwards the file cache is vulnerable to crashes while being written –disk has the same problem –solutions verify after writes use shadow copy for atomic writes

How to protect from system crashes? some kernels bypass the address translations (TLB) –many systems can disable such bypasses –otherwise, code insertion (sandboxing) check for every kernel write using physical address 20-50% slower memory-mapped file –kernel procedures that modify the memory-mapped file should be changed as above –faulty user program can still corrupt files to which it has write access

Warm Reboot Recovery needs to access many data structures – internal file cache lists –page tables (memory-mapped files) –all these data must be protected from crash but they are scattered inside the kernel Registry –a separate physical memory region –contains all the information to recover the file cache –it is updated only when a buffer is replaced (reloaded)

File System Modifications writes to disk can be saved –most disk writes are reliability-induced writes to disk are needed only when the file cache overflows writing back dirty copies when the system is idle –reduces the time when a buffer is replaced

Vista Recoverable Memory

Recovery operations –prepare undo log –writes directly to DB’s mapped image in Rio these updates are persistent –at commit, discard the undo log –at abort, restore the undo log to the mapped DB at recovery –Rio writes back Vista segments that were mapped at the time of crash –Visa examines the segment if there is any uncommitted transactions roll back (restore undo log) –recovery process should be idempotent crash can happen while recovering

Persistent Heap only transactions can use –when they aborts, all the used heaps are returned undo records mentioned above are stored here programs can store their original data structures –usually convert them to record style when stored in a file meta data for the heap is in user space –why? –need a protection from corruption reduce the risk by using isolated range of addresses software fault isolation virtual memory protection

Fault Tolerance with DSM DSM maintains multiple copies of a page –if a copy is lost, it can be recovered from another copy maintain at least two copies for each page –cope with a single failure –can be extend to cope with n-failures what about state information? –can be rebuilt