LectureApril5 - COP 5611 Operating Systems Spring 2010 Dan...

Info iconThis preview shows pages 1–14. Sign up to view the full content.

View Full Document Right Arrow Icon
Click to edit Master subtitle style 5/13/10 Lecture 6 COP 5611 Operating Systems Spring 2010 Dan C. Marinescu Office: HEC 439 B Office hours: M-Wd 1:00-2:00 PM
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
5/13/10 22 2 Lecture April 5, 2010 n Homework 3 due on Wednesday – April 14 n Last time: ¨ All or nothing atomicity n Today: ¨ Before or after atomicity n Next time ¨ Conclude atomicity
Background image of page 2
5/13/10 ___ ___ ___ begin all-or-nothing action ___ ___ ___ arbitrary sequence of ___   lower-layer actions ___ end all-or-nothing action ___ ___ ___ }
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
5/13/10 ___ first step of all-or-nothing action ___ ___ ___ Pre-commit discipline : can back out,  ___ leaving no trace ___ ___ ___  Commit point ___ ___ ___  Post-commit discipline : completion is inevitable ___ ___  last step of all-or-nothing action } }
Background image of page 4
5/13/10 The golden rule of atomicity Never modify the only copy!
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
5/13/10 History of earlier versions Tentative next version Current version 16 14 112 29 5 20 7 Variable A: Version history of one variable V from the journal storage
Background image of page 6
5/13/10 All-or-nothing Journal Storage System Cell Storage System NEW _ A CTI ON – catalogs – versions – outcome records Journal REA D W RI TE ALLOCATE DEALLOCATE AB ORT COM MI T READ _ CURRENT _ VA LUE WRI TE _ NEW _ VA LUE Storage Manager
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
5/13/10 Outcome record n Created when the application calls the NEW_ACTION primitive of the journal storage manager call n It is created instate PENDING n When the application calls WRITE_NEW_VALUE of a data object it should supply ¨ The identifier of the data object ¨ The tentative new value ¨ The identification of the all_or_nothing_action 88
Background image of page 8
5/13/10 Example of an outcome record 99 7 03 outcome records Object A pending 1794: aborted 1423: 1101: committed 1101 1423 1794 all-or-nothing action id: 75 15 24 value:
Background image of page 9

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
5/13/10 new all-or-nothing action is created aborted all-or-nothing action aborts outcome record state no longer of any interest all-or-nothing action commits committed pending non-existent discarded The state transitions of an outcome record
Background image of page 10
5/13/10 procedure   NEW _ ACTION  () id     NEW _ OUTCOME _ RECORD  () id.outcome_record.state     PENDING return  id procedure   COMMIT  ( reference   id ) id.outcome_record.state     COMMITTED procedure   ABORT  ( reference   id ) id.outcome_record.state     ABORTED
Background image of page 11

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
5/13/10 Algorithms to read the current value and write a new value n If the current action fails before the COMMIT the new version of the variable is not visible to anyone wishing to read the current value. n If an action changes multiple values but it fails before commit none of the modified values will be visible. 1212
Background image of page 12
5/13/10 procedure   READ _ CURRENT _ VALUE  ( data_id, caller_id ) starting at end of  data_id   repeat until beginning v     previous   version  of  data_id // Get next older version a   v.action_id // Identify the action  a  that created it s     a.outcome_record.state // Check action  a ’s outcome record
Background image of page 13

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 14
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 05/12/2010 for the course CS COP5611 taught by Professor Dancristianmarinescu during the Spring '10 term at University of Central Florida.

Page1 / 48

LectureApril5 - COP 5611 Operating Systems Spring 2010 Dan...

This preview shows document pages 1 - 14. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online