Free Transactions with Rio Vista Landon Cox April 15, 2016.

Slides:



Advertisements
Similar presentations
Chapter 16: Recovery System
Advertisements

IDA / ADIT Lecture 10: Database recovery Jose M. Peña
TRANSACTION PROCESSING SYSTEM ROHIT KHOKHER. TRANSACTION RECOVERY TRANSACTION RECOVERY TRANSACTION STATES SERIALIZABILITY CONFLICT SERIALIZABILITY VIEW.
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)
CSCI 3140 Module 8 – Database Recovery Theodore Chiasson Dalhousie University.
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.)
Recovery 10/18/05. Implementing atomicity Note, when a transaction commits, the portion of the system implementing durability ensures the transaction’s.
G Robert Grimm New York University Recoverable Virtual Memory.
1 Minggu 8, Pertemuan 16 Transaction Management (cont.) Matakuliah: T0206-Sistem Basisdata Tahun: 2005 Versi: 1.0/0.0.
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 23 Database Recovery Techniques.
Transaction Processing IS698 Min Song. 2 What is a Transaction?  When an event in the real world changes the state of the enterprise, a transaction is.
Chapter 19 Database Recovery Techniques. Slide Chapter 19 Outline Databases Recovery 1. Purpose of Database Recovery 2. Types of Failure 3. Transaction.
G Robert Grimm New York University Recoverable Virtual Memory.
File System Variations and Software Caching May 19, 2000 Instructor: Gary Kimura.
Crash recovery All-or-nothing atomicity & logging.
July 16, 2015ICS 5411 Coping With System Failure Chapter 17 of GUW.
IN-MEMORY DATABASE CSCI WHY? Database systems were developed to manage data collections too large to be stored in main memory They provide multi-user.
Academic Year 2014 Spring. MODULE CC3005NI: Advanced Database Systems “DATABASE RECOVERY” (PART – 1) Academic Year 2014 Spring.
Transactions and Reliability. File system components Disk management Naming Reliability  What are the reliability issues in file systems? Security.
Highly Available ACID Memory Vijayshankar Raman. Introduction §Why ACID memory? l non-database apps: want updates to critical data to be atomic and persistent.
1 Database Systems CS204 Lecture 21 Transaction Processing I Asma Ahmad FAST-NU April 7, 2011.
Switch off your Mobiles Phones or Change Profile to Silent Mode.
UNIX File and Directory Caching How UNIX Optimizes File System Performance and Presents Data to User Processes Using a Virtual File System.
HANDLING FAILURES. Warning This is a first draft I welcome your corrections.
Joonwon Lee Recovery. Lightweight Recoverable Virtual Memory Rio Vista.
Lecture 12 Recoverability and failure. 2 Optimistic Techniques Based on assumption that conflict is rare and more efficient to let transactions proceed.
Recovery System By Dr.S.Sridhar, Ph.D.(JNUD), RACI(Paris, NICE), RMR(USA), RZFM(Germany) DIRECTOR ARUNAI ENGINEERING COLLEGE TIRUVANNAMALAI.
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.
Using Model Checking to Find Serious File System Errors StanFord Computer Systems Laboratory and Microsft Research. Published in 2004 Presented by Chervet.
Transactions and Locks A Quick Reference and Summary BIT 275.
Robustness in the Salus scalable block store Yang Wang, Manos Kapritsos, Zuocheng Ren, Prince Mahajan, Jeevitha Kirubanandam, Lorenzo Alvisi, and Mike.
Database Systems Recovery & Concurrency Lecture # 20 1 st April, 2011.
Chapter 10 Recovery System. ACID Properties  Atomicity. Either all operations of the transaction are properly reflected in the database or none are.
Paging (continued) & Caching CS-3013 A-term Paging (continued) & Caching CS-3013 Operating Systems A-term 2008 (Slides include materials from Modern.
Storage Systems CSE 598d, Spring 2007 Rethink the Sync April 3, 2007 Mark Johnson.
Processes and Virtual Memory
4/1/ Atomicity & Durability Using Shadow Paging CSEP 545 Transaction Processing for E-Commerce Philip A. Bernstein Copyright ©2007 Philip A. Bernstein.
Transaction Management Transparencies. ©Pearson Education 2009 Chapter 14 - Objectives Function and importance of transactions. Properties of transactions.
Chapter 15: Reliability and Security in Database Servers Neyha Amar CS 157B May 6, 2008.
Database System Concepts ©Silberschatz, Korth and Sudarshan See for conditions on re-usewww.db-book.com Chapter 17: Recovery System.
11.1 Silberschatz, Galvin and Gagne ©2005 Operating System Principles 11.5 Free-Space Management Bit vector (n blocks) … 012n-1 bit[i] =  1  block[i]
Journaling versus Softupdates Asynchronous Meta-Data Protection in File System Authors - Margo Seltzer, Gregory Ganger et all Presenter – Abhishek Abhyankar.
Database Recovery Zheng (Godric) Gu. Transaction Concept Storage Structure Failure Classification Log-Based Recovery Deferred Database Modification Immediate.
CSE 451: Operating Systems Winter 2015 Module 17 Journaling File Systems Mark Zbikowski Allen Center 476 © 2013 Gribble, Lazowska,
Jun-Ki Min. Slide Purpose of Database Recovery ◦ To bring the database into the last consistent stat e, which existed prior to the failure. ◦
Speculative execution Landon Cox April 13, Making disk accesses tolerable Basic idea Remove disk accesses from critical path Transform disk latencies.
Day 28 File System.
File System Consistency
Database recovery techniques
Database Recovery Techniques
DURABILITY OF TRANSACTIONS AND CRASH RECOVERY
Free Transactions with Rio Vista
Recovery Control (Chapter 17)
Transactions and Reliability
PHyTM: Persistent Hybrid Transactional Memory
Database Management System
File Processing : Recovery
Introduction to Operating Systems
Page Replacement.
Free Transactions with Rio Vista
Printed on Monday, December 31, 2018 at 2:03 PM.
Module 17: Recovery System
Recovery System.
Speculative execution and storage
Lecture 20: Intro to Transactions & Logging II
Database Recovery 1 Purpose of Database Recovery
Presentation transcript:

Free Transactions with Rio Vista Landon Cox April 15, 2016

Basic assumptions On-disk data is durable and has integrity But slow to access In-memory data is fast to access But not durable and may lack integrity What is the difference between durability and integrity? Durability: data survives faults (crashes and power loss) Integrity: data is correct in face of faults

Basic assumption Why does disk data have durability and integrity? Disk content survives power loss Disk data has integrity because of software interfaces Interface to disk is “explicit and complex” Requires interacting with disk drivers Unlikely to randomly duplicate driver functionality Driver calls are checked for errors Is the interface to memory explicit and complex? No, any store instruction modifies the state of memory Any store instruction can modify any writable memory address

Enter: battery-backed memory NVRAM: non-volatile RAM NVRAM is fast NVRAM makes memory durable NVRAM does not ensure data integrity Same simple interface as volatile RAM Random stores can corrupt in-memory data Question: how to ensure integrity of in-memory data? This becomes a protection question

Protection and NVRAM Previously in protection Language-level guarantees (Java) Instrumented code (Speculative execution) Virtual memory (Micro-kernels, etc.) Disadvantages of languages and instrumentation? Languages constrain programmer choice Languages do not support existing code in other languages Instrumentation can be slow Instrumentation requires interposing on all accesses

Rio file cache A file system interface in front of NVRAM Allows “warm reboot” Cache persists across reboots Inspect content, sync with disk No need to write synchronously No need to maintain dependencies May still want to maintain a journal Only flush when needed (no timers)

Rio file cache A file system interface in front of NVRAM Can apps corrupt cache? Unlikely to randomly generate write Can randomly store to mmap region Do we care about bad mmap stores? No, apps can corrupt their own data Take that risk when using mmap What about kernel stores? Failing kernel can still corrupt cache How to protect cache? Mark pages read-only unless accessed by FS Corruption must occur while cache is writable

Kinds of kernel failures Random bit flips in kernel address space To simulate, randomly flip memory bits Faulty instructions in kernel text To simulate, change src/dst registers of instructions Programming errors Delete initialization code Corrupt pointer variables Randomly free allocated data Overwrite data structures

Methodology Run benchmarks Randomly inject errors Wait for crash … Check to see if data has been corrupted

Rio results What we were afraid of. Protections remove the risk.

Rio file cache How else can we use Rio? What about transactions? Transactions are great, but Rarely used outside of databases Synchronous writes are slow Can be hard to reason about aborts Rio can help make transactions fast 2,000 times faster!

Recoverable memory RVM: CMU library for recoverable memory In whose address space is the recoverable memory?In the application’s Copy of initial memory region. Copy of updated memory region.

Recoverable memory RVM: CMU library for recoverable memory How many times is data copied?3: to undo log, to redo log, to database

Recoverable memory RVM: CMU library for recoverable memory What is the undo log used for?User-initiated aborts

Recoverable memory RVM: CMU library for recoverable memory What action commits the transaction?Write commit record to redo log

Recoverable memory RVM: CMU library for recoverable memory Which ACID properties does this provide?Durability and atomicity

Vista recoverable memory Vista: library for recoverable memory on Rio Why don’t we need the redo log?Can just use persistent undo log to recover

Vista recoverable memory Vista: library for recoverable memory on Rio Interface to Vista is a malloc-like heap manager

Vista recoverable memory Vista: library for recoverable memory on Rio What needs to be protected?Heap management, undo log

Vista recoverable memory Vista: library for recoverable memory on Rio Why aren’t Rio protections sufficient?Data lives in app address space Syscalls to alter protections  slow

Vista recoverable memory Vista: library for recoverable memory on Rio How is Vista protected?Create a moat around important data

Protecting Vista

Evaluation Why the drop off here?

Evaluation Why the drop off here?