1 / 7

CS 415 Operating Systems Principles Logging and Recovery

CS 415 Operating Systems Principles Logging and Recovery. Dr. Edward C. Cheng. Logging and Recovery. Background System Model of the Logging System A Disintegration Model of Activity Recording 2-Phase Commit Protocol Rollback Recovery.

colin-neal
Download Presentation

CS 415 Operating Systems Principles Logging and Recovery

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. CS 415 Operating Systems Principles Logging and Recovery Dr. Edward C. Cheng

  2. Logging and Recovery • Background • System Model of the Logging System • A Disintegration Model of Activity Recording • 2-Phase Commit Protocol • Rollback Recovery

  3. Fig 1. With OJS, multiple data streams can be open per AP/RM Fig 2. Data streams are managed through life-cycle states System Model of Journaling • Tightly coupled with the resource manager or application program • Open Journal idea introduced in the 90’s separating journaling from the RM or AP

  4. A Disintegration Model of Activity Recording • Events that are not dependent on each other can have their activity records disintegrated thus provide various optimization opportunities

  5. 2-Phase Commit (2PC) Protocol • A protocol to support Atomicity Behavior in distributive environment • A coordinator (parent transaction) issues a request to commit to all subordinates (children transactions) • Each subordinate writes a journal record to ensure ability to roll-forward and rollback in case of a crash • Each subordinate responds to the parent with a ready-to-commit or abort • If all subordinates are ready-to-commit, the coordinate issues a commit event to all subordinates (otherwise an abort event) • All subordinates commit their works

  6. Recovery • Checkpoint – the point where all committed changes are flushed out to data pages • Undo record: enough information to rollback the change (insert, delete, update) – mainly before and after images • Redo record: enough information to re-execute un-flushed changes • Upon commit, only make sure to flush out the log records so that upon recovery (after a crash), the system can redo the changes • Changes might be flushed out to disk before commit. Locks are used to protect us from dirty read. Undo records help to undo uncommitted transactions upon recovery • Question: what if you have changes that cannot be undone?

  7. Next Class Security

More Related