Copyright 2016 Ramez Elmasri and Shamkant B. Navathe

Size: px
Start display at page:

Download "Copyright 2016 Ramez Elmasri and Shamkant B. Navathe"

Transcription

1 Copyright 2016 Ramez Elmasri ad Shamkat B. Navathe

2 CHAPTER 21 Cocurrecy Cotrol Techiques Copyright 2016 Ramez Elmasri ad Shamkat B. Navathe

3 Itroductio Cocurrecy cotrol protocols Set of rules to guaratee serializability Two-phase lockig protocols Lock data items to prevet cocurret access Timestamp Uique idetifier for each trasactio Multiversio currecy cotrol protocols Use multiple versios of a data item Validatio or certificatio of a trasactio Copyright 2016 Ramez Elmasri ad Shamkat B. Navathe Slide 21-3

4 21.1 Two-Phase Lockig Techiques for Cocurrecy Cotrol Lock Variable associated with a data item describig status for operatios that ca be applied Oe lock for each item i the database Biary locks Two states (values) Locked (1) Item caot be accessed Ulocked (0) Item ca be accessed whe requested Copyright 2016 Ramez Elmasri ad Shamkat B. Navathe Slide 21-4

5 Two-Phase Lockig Techiques for Cocurrecy Cotrol (cot d.) Trasactio requests access by issuig a lock_item(x) operatio Figure 21.1 Lock ad ulock operatios for biary locks Copyright 2016 Ramez Elmasri ad Shamkat B. Navathe Slide 21-5

6 Two-Phase Lockig Techiques for Cocurrecy Cotrol (cot d.) Lock table specifies items that have locks Lock maager subsystem Keeps track of ad cotrols access to locks Rules eforced by lock maager module At most oe trasactio ca hold the lock o a item at a give time Biary lockig too restrictive for database items Copyright 2016 Ramez Elmasri ad Shamkat B. Navathe Slide 21-6

7 Two-Phase Lockig Techiques for Cocurrecy Cotrol (cot d.) Shared/exclusive or read/write locks Read operatios o the same item are ot coflictig Must have exclusive lock to write Three lockig operatios read_lock(x) write_lock(x) ulock(x) Copyright 2016 Ramez Elmasri ad Shamkat B. Navathe Slide 21-7

8 Figure 21.2 Lockig ad ulockig operatios for two-mode (read/write, or shared/exclusive) locks Copyright 2016 Ramez Elmasri ad Shamkat B. Navathe Slide 21-8

9 Two-Phase Lockig Techiques for Cocurrecy Cotrol (cot d.) Lock coversio Trasactio that already holds a lock allowed to covert the lock from oe state to aother Upgradig Issue a read_lock operatio the a write_lock operatio Dowgradig Issue a read_lock operatio after a write_lock operatio Copyright 2016 Ramez Elmasri ad Shamkat B. Navathe Slide 21-9

10 Guarateeig Serializability by Two- Phase Lockig Two-phase lockig protocol All lockig operatios precede the first ulock operatio i the trasactio Phases Expadig (growig) phase New locks ca be acquired but oe ca be released Lock coversio upgrades must be doe durig this phase Shrikig phase Existig locks ca be released but oe ca be acquired Dowgrades must be doe durig this phase Copyright 2016 Ramez Elmasri ad Shamkat B. Navathe Slide 21-10

11 Figure 21.3 Trasactios that do ot obey two-phase lockig (a) Two trasactios T1 ad T2 (b) Results of possible serial schedules of T1 ad T2 (c) A oserializable schedule S that uses locks Copyright 2016 Ramez Elmasri ad Shamkat B. Navathe Slide 21-11

12 Guarateeig Serializability by Two- Phase Lockig If every trasactio i a schedule follows the twophase lockig protocol, schedule guarateed to be serializable Two-phase lockig may limit the amout of cocurrecy that ca occur i a schedule Some serializable schedules will be prohibited by two-phase lockig protocol Copyright 2016 Ramez Elmasri ad Shamkat B. Navathe Slide 21-12

13 Variatios of Two-Phase Lockig Basic 2PL Techique described o previous slides Coservative (static) 2PL Requires a trasactio to lock all the items it accesses before the trasactio begis Predeclare read-set ad write-set Deadlock-free protocol Strict 2PL Trasactio does ot release exclusive locks util after it commits or aborts Copyright 2016 Ramez Elmasri ad Shamkat B. Navathe Slide 21-13

14 Variatios of Two-Phase Lockig (cot d.) Rigorous 2PL Trasactio does ot release ay locks util after it commits or aborts Cocurrecy cotrol subsystem resposible for geeratig read_lock ad write_lock requests Lockig geerally cosidered to have high overhead Copyright 2016 Ramez Elmasri ad Shamkat B. Navathe Slide 21-14

15 Dealig with Deadlock ad Starvatio Deadlock Occurs whe each trasactio T i a set is waitig for some item locked by some other trasactio T Both trasactios stuck i a waitig queue Figure 21.5 Illustratig the deadlock problem (a) A partial schedule of T1 ad T2 that is i a state of deadlock (b) A wait-for graph for the partial schedule i (a) Copyright 2016 Ramez Elmasri ad Shamkat B. Navathe Slide 21-15

16 Dealig with Deadlock ad Starvatio (cot d.) Deadlock prevetio protocols Every trasactio locks all items it eeds i advace Orderig all items i the database Trasactio that eeds several items will lock them i that order Both approaches impractical Protocols based o a timestamp Wait-die Woud-wait Copyright 2016 Ramez Elmasri ad Shamkat B. Navathe Slide 21-16

17 Dealig with Deadlock ad Starvatio (cot d.) No waitig algorithm If trasactio uable to obtai a lock, immediately aborted ad restarted later Cautious waitig algorithm Deadlock-free Deadlock detectio System checks to see if a state of deadlock exists Wait-for graph Copyright 2016 Ramez Elmasri ad Shamkat B. Navathe Slide 21-17

18 Dealig with Deadlock ad Starvatio (cot d.) Victim selectio Decidig which trasactio to abort i case of deadlock Timeouts If system waits loger tha a predefied time, it aborts the trasactio Starvatio Occurs if a trasactio caot proceed for a idefiite period of time while other trasactios cotiue ormally Solutio: first-come-first-served queue Copyright 2016 Ramez Elmasri ad Shamkat B. Navathe Slide 21-18

19 21.2 Cocurrecy Cotrol Based o Timestamp Orderig Timestamp Uique idetifier assiged by the DBMS to idetify a trasactio Assiged i the order submitted Trasactio start time Cocurrecy cotrol techiques based o timestamps do ot use locks Deadlocks caot occur Copyright 2016 Ramez Elmasri ad Shamkat B. Navathe Slide 21-19

20 Cocurrecy Cotrol Based o Timestamp Orderig (cot d.) Geeratig timestamps Couter icremeted each time its value is assiged to a trasactio Curret date/time value of the system clock Esure o two timestamps are geerated durig the same tick of the clock Geeral approach Eforce equivalet serial order o the trasactios based o their timestamps Copyright 2016 Ramez Elmasri ad Shamkat B. Navathe Slide 21-20

21 Cocurrecy Cotrol Based o Timestamp Orderig (cot d.) Timestamp orderig (TO) Allows iterleavig of trasactio operatios Must esure timestamp order is followed for each pair of coflictig operatios Each database item assiged two timestamp values read_ts(x) write_ts(x) Copyright 2016 Ramez Elmasri ad Shamkat B. Navathe Slide 21-21

22 Cocurrecy Cotrol Based o Timestamp Orderig (cot d.) Basic TO algorithm If coflictig operatios detected, later operatio rejected by abortig trasactio that issued it Schedules produced guarateed to be coflict serializable Starvatio may occur Strict TO algorithm Esures schedules are both strict ad coflict serializable Copyright 2016 Ramez Elmasri ad Shamkat B. Navathe Slide 21-22

23 Cocurrecy Cotrol Based o Timestamp Orderig (cot d.) Thomas s write rule Modificatio of basic TO algorithm Does ot eforce coflict serializability Rejects fewer write operatios by modifyig checks for write_item(x) operatio Copyright 2016 Ramez Elmasri ad Shamkat B. Navathe Slide 21-23

24 21.3 Multiversio Cocurrecy Cotrol Techiques Several versios of a item are kept by a system Some read operatios that would be rejected i other techiques ca be accepted by readig a older versio of the item Maitais serializability More storage is eeded Multiversio currecy cotrol scheme types Based o timestamp orderig Based o two-phase lockig Validatio ad sapshot isolatio techiques Copyright 2016 Ramez Elmasri ad Shamkat B. Navathe Slide 21-24

25 Multiversio Cocurrecy Cotrol Techiques (cot d.) Multiversio techique based o timestamp orderig Two timestamps associated with each versio are kept read_ts(x i ) write_ts(x i ) Copyright 2016 Ramez Elmasri ad Shamkat B. Navathe Slide 21-25

26 Multiversio Cocurrecy Cotrol Techiques (cot d.) Multiversio two-phase lockig usig certify locks Three lockig modes: read, write, ad certify Figure 21.6 Lock compatibility tables (a) Lock compatibility table for read/write lockig scheme (b) Lock compatibility table for read/write/certify lockig scheme Copyright 2016 Ramez Elmasri ad Shamkat B. Navathe Slide 21-26

27 21.4 Validatio (Optimistic) Techiques ad Sapshot Isolatio Cocurrecy Cotrol Optimistic techiques Also called validatio or certificatio techiques No checkig is doe while the trasactio is executig Updates ot applied directly to the database util fiished trasactio is validated All updates applied to local copies of data items Validatio phase checks whether ay of trasactio s updates violate serializability Trasactio committed or aborted based o result Copyright 2016 Ramez Elmasri ad Shamkat B. Navathe Slide 20-27

28 Cocurrecy Cotrol Based o Sapshot Isolatio Trasactio sees data items based o committed values of the items i the database sapshot Does ot see updates that occur after trasactio starts Read operatios do ot require read locks Write operatios require write locks Temporary versio store keeps track of older versios of updated items Variatio: serializable sapshot isolatio (SSI) Copyright 2016 Ramez Elmasri ad Shamkat B. Navathe Slide 20-28

29 21.5 Graularity of Data Items ad Multiple Graularity Lockig Size of data items kow as graularity Fie (small) Coarse (large) Larger the data item size, lower the degree of cocurrecy permitted Example: etire disk block locked Smaller the data item size, more locks required Higher overhead Best item size depeds o trasactio type Copyright 2016 Ramez Elmasri ad Shamkat B. Navathe Slide 20-29

30 Multiple Graularity Level Lockig Lock ca be requested at ay level Figure 21.7 A graularity hierarchy for illustratig multiple graularity level lockig Copyright 2016 Ramez Elmasri ad Shamkat B. Navathe Slide 21-30

31 Multiple Graularity Level Lockig (cot d.) Itetio locks are eeded Trasactio idicates alog the path from the root to the desired ode, what type of lock (shared or exclusive) it will require from oe of the ode s descedats Itetio lock types Itetio-shared (IS) Shared locks will be requested o a descedat ode Itetio-exclusive (IX) Exclusive locks will be requested Copyright 2016 Ramez Elmasri ad Shamkat B. Navathe Slide 21-31

32 Multiple Graularity Level Lockig (cot d.) Itetio lock types (cot d.) Shared-itesio-exclusive (SIX) Curret ode is locked i shared mode but oe or more exclusive locks will be requested o a descedat ode Figure 21.8 Lock compatibility matrix for multiple graularity lockig Copyright 2016 Ramez Elmasri ad Shamkat B. Navathe Slide 21-32

33 Multiple Graularity Level Lockig (cot d.) Multiple graularity lockig (MGL) protocol rules Copyright 2016 Ramez Elmasri ad Shamkat B. Navathe Slide 21-33

34 21.6 Usig Locks for Cocurrecy Cotrol i Idexes Two-phase lockig ca be applied to B-tree ad B+ -tree idexes Nodes of a idex correspod to disk pages Holdig locks o idex pages could cause trasactio blockig Other approaches must be used Coservative approach Lock the root ode i exclusive mode ad the access the appropriate child ode of the root Copyright 2016 Ramez Elmasri ad Shamkat B. Navathe Slide 21-34

35 Usig Locks for Cocurrecy Cotrol i Idexes (cot d.) Optimistic approach Request ad hold shared locks o odes leadig to the leaf ode, with exclusive lock o the leaf B-lik tree approach Siblig odes o the same level are liked at every level Allows shared locks whe requestig a page Requires lock be released before accessig the child ode Copyright 2016 Ramez Elmasri ad Shamkat B. Navathe Slide 21-35

36 21.7 Other Cocurrecy Cotrol Issues Isertio Whe ew data item is iserted, it caot be accessed util after operatio is completed Deletio operatio o the existig data item Write lock must be obtaied before deletio Phatom problem Ca occur whe a ew record beig iserted satisfies a coditio that a set of records accessed by aother trasactio must satisfy Record causig coflict ot recogized by cocurrecy cotrol protocol Copyright 2016 Ramez Elmasri ad Shamkat B. Navathe Slide 21-36

37 Other Cocurrecy Cotrol Issues (cot d.) Iteractive trasactios User ca iput a value of a data item to a trasactio T based o some value writte to the scree by trasactio T, which may ot have committed Solutio approach: postpoe output of trasactios to the scree util committed Latches Locks held for a short duratio Do ot follow usual cocurrecy cotrol protocol Copyright 2016 Ramez Elmasri ad Shamkat B. Navathe Slide 21-37

38 21.8 Summary Cocurrecy cotrol techiques Two-phase lockig Timestamp-based orderig Multiversio protocols Sapshot isolatio Data item graularity Lockig protocols for idexes Phatom problem ad iteractive trasactio issues Copyright 2016 Ramez Elmasri ad Shamkat B. Navathe Slide 21-38

Copyright 2016 Ramez Elmasri and Shamkant B. Navathe

Copyright 2016 Ramez Elmasri and Shamkant B. Navathe Copyright 2016 Ramez Elmasri ad Shamkat B. Navathe CHAPTER 20 Itroductio to Trasactio Processig Cocepts ad Theory Copyright 2016 Ramez Elmasri ad Shamkat B. Navathe Itroductio Trasactio Describes local

More information

TRANSACTION MANAGEMENT [CH 16]

TRANSACTION MANAGEMENT [CH 16] Sprig 2017 TRANSACTION MANAGEMENT [CH 16] 4/25/17 CS 564: Database Maagemet Systems; (c) Jigesh M. Patel, 2013 1 Trasactio Maagemet Read (A); Check (A > $25); Pay ($25); A = A 25; Write (A); Yes You Read

More information

Copyright 2016 Ramez Elmasri and Shamkant B. Navathe

Copyright 2016 Ramez Elmasri and Shamkant B. Navathe Copyright 2016 Ramez Elmasri ad Shamkat B. Navathe CHAPTER 22 Database Recovery Techiques Copyright 2016 Ramez Elmasri ad Shamkat B. Navathe Itroductio Recovery algorithms Recovery cocepts Write-ahead

More information

Chapter 5. Concurrency Control Techniques. Adapted from the slides of Fundamentals of Database Systems (Elmasri et al., 2006)

Chapter 5. Concurrency Control Techniques. Adapted from the slides of Fundamentals of Database Systems (Elmasri et al., 2006) Chapter 5 Concurrency Control Techniques Adapted from the slides of Fundamentals of Database Systems (Elmasri et al., 2006) Chapter Outline Purpose of Concurrency Control Two-Phase Locking Techniques Concurrency

More information

Review: The ACID properties

Review: The ACID properties Recovery Review: The ACID properties A tomicity: All actios i the Xactio happe, or oe happe. C osistecy: If each Xactio is cosistet, ad the DB starts cosistet, it eds up cosistet. I solatio: Executio of

More information

Chapter 10 : Concurrency Control

Chapter 10 : Concurrency Control Chapter 10 : Cocurrecy Cotro modified from: Database System Cocepts, 6 th Ed. Siberschatz, Korth ad Sudarsha See www.db-book.com for coditios o re-use Ituitio of Lock-based Protocos Trasactios have to

More information

Copyright 2007 Ramez Elmasri and Shamkant B. Navathe. Slide 18-1

Copyright 2007 Ramez Elmasri and Shamkant B. Navathe. Slide 18-1 Slide 18-1 Chapter 18 Concurrency Control Techniques Chapter 18 Outline Databases Concurrency Control 1. Purpose of Concurrency Control 2. Two-Phase locking 3. Limitations of CCMs 4. Index Locking 5. Lock

More information

Deadlocks Detection and Avoidance. Prof. Sirer CS 4410 Cornell University

Deadlocks Detection and Avoidance. Prof. Sirer CS 4410 Cornell University Deadlocks Detectio ad Avoidace Prof. Sirer CS 4410 Corell Uiversity System Model There are o-shared computer resources Maybe more tha oe istace Priters, Semaphores, Tape drives, CPU Processes eed access

More information

Chapter 18 Concurrency Control Techniques

Chapter 18 Concurrency Control Techniques Chapter 18 Concurrency Control Techniques Copyright 2004 Pearson Education, Inc. Chapter 18 Outline Databases Concurrency Control 1 Purpose of Concurrency Control 2 Two-Phase locking 5 Limitations of CCMs

More information

Copyright 2016 Ramez Elmasri and Shamkant B. Navathe

Copyright 2016 Ramez Elmasri and Shamkant B. Navathe Copyright 2016 Ramez Elmasri ad Shamkat B. Navathe CHAPTER 18 Strategies for Query Processig Copyright 2016 Ramez Elmasri ad Shamkat B. Navathe Itroductio DBMS techiques to process a query Scaer idetifies

More information

Lock!= Serializability. REVISÃO: Controle de Concorrência. Two-Phase Locking Techniques

Lock!= Serializability. REVISÃO: Controle de Concorrência. Two-Phase Locking Techniques REVISÃO: Controle de Concorrência Bancos de Dados Avançados Concorrência: gerenciamento de bloqueio DCC030 - TCC: Bancos de Dados Avançados (Ciência Computação) DCC049 - TSI: Bancos de Dados Avançados

More information

Copyright 2016 Ramez Elmasri and Shamkant B. Navathe

Copyright 2016 Ramez Elmasri and Shamkant B. Navathe Copyright 2016 Ramez Elmasri ad Shamkat B. Navathe CHAPTER 19 Query Optimizatio Copyright 2016 Ramez Elmasri ad Shamkat B. Navathe Itroductio Query optimizatio Coducted by a query optimizer i a DBMS Goal:

More information

BCA204T: DATA BASE MANAGEMENT SYSTEMS

BCA204T: DATA BASE MANAGEMENT SYSTEMS BCA204T: DATA BASE MANAGEMENT SYSTEMS Page 1 of 12 BCA204T: DATA BASE MANAGEMENT SYSTEMS Unit - V Transaction Processing Concepts: Introduction, Transaction and System Concepts, Desirable properties of

More information

Copyright 2016 Ramez Elmasri and Shamkant B. Navathe

Copyright 2016 Ramez Elmasri and Shamkant B. Navathe Copyright 2016 Ramez Elmasri ad Shamkat B. Navathe CHAPTER 26 Ehaced Data Models: Itroductio to Active, Temporal, Spatial, Multimedia, ad Deductive Databases Copyright 2016 Ramez Elmasri ad Shamkat B.

More information

Chapter 11. Friends, Overloaded Operators, and Arrays in Classes. Copyright 2014 Pearson Addison-Wesley. All rights reserved.

Chapter 11. Friends, Overloaded Operators, and Arrays in Classes. Copyright 2014 Pearson Addison-Wesley. All rights reserved. Chapter 11 Frieds, Overloaded Operators, ad Arrays i Classes Copyright 2014 Pearso Addiso-Wesley. All rights reserved. Overview 11.1 Fried Fuctios 11.2 Overloadig Operators 11.3 Arrays ad Classes 11.4

More information

Basic allocator mechanisms The course that gives CMU its Zip! Memory Management II: Dynamic Storage Allocation Mar 6, 2000.

Basic allocator mechanisms The course that gives CMU its Zip! Memory Management II: Dynamic Storage Allocation Mar 6, 2000. 5-23 The course that gives CM its Zip Memory Maagemet II: Dyamic Storage Allocatio Mar 6, 2000 Topics Segregated lists Buddy system Garbage collectio Mark ad Sweep Copyig eferece coutig Basic allocator

More information

Data diverse software fault tolerance techniques

Data diverse software fault tolerance techniques Data diverse software fault tolerace techiques Complemets desig diversity by compesatig for desig diversity s s limitatios Ivolves obtaiig a related set of poits i the program data space, executig the

More information

Transaction Processing: Basics - Transactions

Transaction Processing: Basics - Transactions Transaction Processing: Basics - Transactions Transaction is execution of program that accesses DB Basic operations: 1. read item(x): Read DB item X into program variable 2. write item(x): Write program

More information

BAAN IVc/BaanERP. Conversion Guide Oracle7 to Oracle8

BAAN IVc/BaanERP. Conversion Guide Oracle7 to Oracle8 BAAN IVc/BaaERP A publicatio of: Baa Developmet B.V. P.O.Box 143 3770 AC Bareveld The Netherlads Prited i the Netherlads Baa Developmet B.V. 1999. All rights reserved. The iformatio i this documet is subject

More information

Database Management Systems

Database Management Systems Database Management Systems Concurrency Control Doug Shook Review Why do we need transactions? What does a transaction contain? What are the four properties of a transaction? What is a schedule? What is

More information

% Sun Logo for. X3T10/95-229, Revision 0. April 18, 1998

% Sun Logo for. X3T10/95-229, Revision 0. April 18, 1998 Su Microsystems, Ic. 2550 Garcia Aveue Moutai View, CA 94045 415 960-1300 X3T10/95-229, Revisio 0 April 18, 1998 % Su Logo for Joh Lohmeyer Chairperso, X3T10 Symbios Logic Ic. 1635 Aeroplaza Drive Colorado

More information

Implementing Consistency -- Paxos. Some slides from Michael Freedman

Implementing Consistency -- Paxos. Some slides from Michael Freedman Implemetig Cosistecy -- Paxos Some slides from Michael Freedma What do cliets see? Distributed stores use replicatio Fault tolerace ad scalability Does replicatio ecessitate icosistecy? Harder to program,

More information

Lecture 21 Concurrency Control Part 1

Lecture 21 Concurrency Control Part 1 CMSC 461, Database Management Systems Spring 2018 Lecture 21 Concurrency Control Part 1 These slides are based on Database System Concepts 6 th edition book (whereas some quotes and figures are used from

More information

Federated Transaction Management with Snapshot Isolation

Federated Transaction Management with Snapshot Isolation Federated Trasactio Maagemet with Sapshot Isolatio Ralf Schekel, Gerhard Weikum Norbert Weißeberg Xuequ Wu Uiversity of the Saarlad Frauhofer ISST Deutsche Telekom AG email {schekel,weikum}@cs.ui-sb.de

More information

Chapter 15 : Concurrency Control

Chapter 15 : Concurrency Control Chapter 15 : Concurrency Control What is concurrency? Multiple 'pieces of code' accessing the same data at the same time Key issue in multi-processor systems (i.e. most computers today) Key issue for parallel

More information

Concurrency Control Techniques

Concurrency Control Techniques Concurrency Control Techniques Chapter 18 March 24, 2008 ADBS: Concurrency control 1 Chapter Objectives Discusses a number of concurrency control techniques that are used to insure the noninterference

More information

Traditional queuing behaviour in routers. Scheduling and queue management. Questions. Scheduling mechanisms. Scheduling [1] Scheduling [2]

Traditional queuing behaviour in routers. Scheduling and queue management. Questions. Scheduling mechanisms. Scheduling [1] Scheduling [2] Traditioal queuig behaviour i routers Schedulig ad queue maagemet Data trasfer: datagrams: idividual packets o recogitio of flows coectioless: o sigallig Forwardig: based o per-datagram, forwardig table

More information

Lecture 22 Concurrency Control Part 2

Lecture 22 Concurrency Control Part 2 CMSC 461, Database Management Systems Spring 2018 Lecture 22 Concurrency Control Part 2 These slides are based on Database System Concepts 6 th edition book (whereas some quotes and figures are used from

More information

CIS 121 Data Structures and Algorithms with Java Spring Stacks, Queues, and Heaps Monday, February 18 / Tuesday, February 19

CIS 121 Data Structures and Algorithms with Java Spring Stacks, Queues, and Heaps Monday, February 18 / Tuesday, February 19 CIS Data Structures ad Algorithms with Java Sprig 09 Stacks, Queues, ad Heaps Moday, February 8 / Tuesday, February 9 Stacks ad Queues Recall the stack ad queue ADTs (abstract data types from lecture.

More information

Chapter 13 : Concurrency Control

Chapter 13 : Concurrency Control Chapter 13 : Concurrency Control Chapter 13: Concurrency Control Lock-Based Protocols Timestamp-Based Protocols Validation-Based Protocols Multiple Granularity Multiversion Schemes Insert and Delete Operations

More information

Transaction: Action, or series of actions, carried out by user or application, which accesses or changes contents of database. It Transforms database from one consistent state to another, although consistency

More information

Threads and Concurrency in Java: Part 2

Threads and Concurrency in Java: Part 2 Threads ad Cocurrecy i Java: Part 2 1 Waitig Sychroized methods itroduce oe kid of coordiatio betwee threads. Sometimes we eed a thread to wait util a specific coditio has arise. 2003--09 T. S. Norvell

More information

! A lock is a mechanism to control concurrent access to a data item! Data items can be locked in two modes :

! A lock is a mechanism to control concurrent access to a data item! Data items can be locked in two modes : Lock-Based Protocols Concurrency Control! A lock is a mechanism to control concurrent access to a data item! Data items can be locked in two modes : 1 exclusive (X) mode Data item can be both read as well

More information

Transaction Management

Transaction Management Transaction Management 1) Explain properties of a transaction? (JUN/JULY 2015) Transactions should posses the following (ACID) properties: Transactions should possess several properties. These are often

More information

Threads and Concurrency in Java: Part 1

Threads and Concurrency in Java: Part 1 Cocurrecy Threads ad Cocurrecy i Java: Part 1 What every computer egieer eeds to kow about cocurrecy: Cocurrecy is to utraied programmers as matches are to small childre. It is all too easy to get bured.

More information

Threads and Concurrency in Java: Part 1

Threads and Concurrency in Java: Part 1 Threads ad Cocurrecy i Java: Part 1 1 Cocurrecy What every computer egieer eeds to kow about cocurrecy: Cocurrecy is to utraied programmers as matches are to small childre. It is all too easy to get bured.

More information

CMSC Computer Architecture Lecture 15: Multi-Core. Prof. Yanjing Li University of Chicago

CMSC Computer Architecture Lecture 15: Multi-Core. Prof. Yanjing Li University of Chicago CMSC 22200 Computer Architecture Lecture 15: Multi-Core Prof. Yajig Li Uiversity of Chicago Course Evaluatio Very importat Please fill out! 2 Lab3 Brach Predictio Competitio 8 teams etered the competitio,

More information

Chapter 9. Pointers and Dynamic Arrays. Copyright 2015 Pearson Education, Ltd.. All rights reserved.

Chapter 9. Pointers and Dynamic Arrays. Copyright 2015 Pearson Education, Ltd.. All rights reserved. Chapter 9 Poiters ad Dyamic Arrays Copyright 2015 Pearso Educatio, Ltd.. All rights reserved. Overview 9.1 Poiters 9.2 Dyamic Arrays Copyright 2015 Pearso Educatio, Ltd.. All rights reserved. Slide 9-3

More information

Foundation of Database Transaction Processing. Copyright 2012 Pearson Education, Inc.

Foundation of Database Transaction Processing. Copyright 2012 Pearson Education, Inc. Foundation of Database Transaction Processing Copyright 2012 Pearson Education, Inc. Chapter Outline - 17.1 Introduction to Transaction Processing - 17.2 Transaction and System Concepts - 17.3 Desirable

More information

Concurrency Control! Snapshot isolation" q How to ensure serializability and recoverability? " q Lock-Based Protocols" q Other Protocols"

Concurrency Control! Snapshot isolation q How to ensure serializability and recoverability?  q Lock-Based Protocols q Other Protocols Concurrency Control! q How to ensure serializability and recoverability? q Lock-Based Protocols q Lock, 2PL q Lock Conversion q Lock Implementation q Deadlock q Multiple Granularity q Other Protocols q

More information

Lecture 13 Concurrency Control

Lecture 13 Concurrency Control Lecture 13 Concurrency Control Shuigeng Zhou December 23, 2009 School of Computer Science Fudan University Outline Lock-Based Protocols Multiple Granularity Deadlock Handling Insert and Delete Operations

More information

Lecture Notes 6 Introduction to algorithm analysis CSS 501 Data Structures and Object-Oriented Programming

Lecture Notes 6 Introduction to algorithm analysis CSS 501 Data Structures and Object-Oriented Programming Lecture Notes 6 Itroductio to algorithm aalysis CSS 501 Data Structures ad Object-Orieted Programmig Readig for this lecture: Carrao, Chapter 10 To be covered i this lecture: Itroductio to algorithm aalysis

More information

Chapter 8. Strings and Vectors. Copyright 2014 Pearson Addison-Wesley. All rights reserved.

Chapter 8. Strings and Vectors. Copyright 2014 Pearson Addison-Wesley. All rights reserved. Chapter 8 Strigs ad Vectors Overview 8.1 A Array Type for Strigs 8.2 The Stadard strig Class 8.3 Vectors Slide 8-3 8.1 A Array Type for Strigs A Array Type for Strigs C-strigs ca be used to represet strigs

More information

The Magma Database file formats

The Magma Database file formats The Magma Database file formats Adrew Gaylard, Bret Pikey, ad Mart-Mari Breedt Johaesburg, South Africa 15th May 2006 1 Summary Magma is a ope-source object database created by Chris Muller, of Kasas City,

More information

Chapter 8. Strings and Vectors. Copyright 2015 Pearson Education, Ltd.. All rights reserved.

Chapter 8. Strings and Vectors. Copyright 2015 Pearson Education, Ltd.. All rights reserved. Chapter 8 Strigs ad Vectors Copyright 2015 Pearso Educatio, Ltd.. All rights reserved. Overview 8.1 A Array Type for Strigs 8.2 The Stadard strig Class 8.3 Vectors Copyright 2015 Pearso Educatio, Ltd..

More information

COMPUTER ORGANIZATION AND DESIGN The Hardware/Software Interface. Chapter 4. The Processor. Part A Datapath Design

COMPUTER ORGANIZATION AND DESIGN The Hardware/Software Interface. Chapter 4. The Processor. Part A Datapath Design COMPUTER ORGANIZATION AND DESIGN The Hardware/Software Iterface 5 th Editio Chapter The Processor Part A path Desig Itroductio CPU performace factors Istructio cout Determied by ISA ad compiler. CPI ad

More information

Reliable Transmission. Spring 2018 CS 438 Staff - University of Illinois 1

Reliable Transmission. Spring 2018 CS 438 Staff - University of Illinois 1 Reliable Trasmissio Sprig 2018 CS 438 Staff - Uiversity of Illiois 1 Reliable Trasmissio Hello! My computer s ame is Alice. Alice Bob Hello! Alice. Sprig 2018 CS 438 Staff - Uiversity of Illiois 2 Reliable

More information

Course Site: Copyright 2012, Elsevier Inc. All rights reserved.

Course Site:   Copyright 2012, Elsevier Inc. All rights reserved. Course Site: http://cc.sjtu.edu.c/g2s/site/aca.html 1 Computer Architecture A Quatitative Approach, Fifth Editio Chapter 2 Memory Hierarchy Desig 2 Outlie Memory Hierarchy Cache Desig Basic Cache Optimizatios

More information

% Sun Logo for Frame. X3T10/95-229, Revision 2. September 28, 1995

% Sun Logo for Frame. X3T10/95-229, Revision 2. September 28, 1995 Su Microsystems, Ic. 2550 Garcia Aveue Moutai View, CA 94045 415 960-1300 X3T10/95-229, Revisio 2 September 28, 1995 % Su Logo for Frame Joh Lohmeyer Chairperso, X3T10 Symbios Logic Ic. 1635 Aeroplaza

More information

6.854J / J Advanced Algorithms Fall 2008

6.854J / J Advanced Algorithms Fall 2008 MIT OpeCourseWare http://ocw.mit.edu 6.854J / 18.415J Advaced Algorithms Fall 2008 For iformatio about citig these materials or our Terms of Use, visit: http://ocw.mit.edu/terms. 18.415/6.854 Advaced Algorithms

More information

CMSC 424 Database design Lecture 22 Concurrency/recovery. Mihai Pop

CMSC 424 Database design Lecture 22 Concurrency/recovery. Mihai Pop CMSC 424 Database design Lecture 22 Concurrency/recovery Mihai Pop Admin Signup sheet for project presentations Recap...1 ACID properties: Atomicity (recovery) Consistency (transaction design,, concurrency

More information

Deadlock Prevention (cont d) Deadlock Prevention. Example: Wait-Die. Wait-Die

Deadlock Prevention (cont d) Deadlock Prevention. Example: Wait-Die. Wait-Die Deadlock Prevention Deadlock Prevention (cont d) 82 83 When there is a high level of lock contention and an increased likelihood of deadlocks Prevent deadlocks by giving each Xact a priority Assign priorities

More information

BST Sequence of Operations

BST Sequence of Operations Splay Trees Problems with BSTs Because the shape of a BST is determied by the order that data is iserted, we ru the risk of trees that are essetially lists 12 21 20 32 24 37 15 40 55 56 77 2 BST Sequece

More information

COMPUTER ORGANIZATION AND DESIGN The Hardware/Software Interface. Chapter 4. The Processor Advanced Issues

COMPUTER ORGANIZATION AND DESIGN The Hardware/Software Interface. Chapter 4. The Processor Advanced Issues COMPUTER ORGANIZATION AND DESIGN The Hardware/Software Iterface 5 th Editio Chapter 4 The Processor Advaced Issues Review: Pipelie Hazards Structural hazards Desig pipelie to elimiate structural hazards.

More information

Module Instantiation. Finite State Machines. Two Types of FSMs. Finite State Machines. Given submodule mux32two: Instantiation of mux32two

Module Instantiation. Finite State Machines. Two Types of FSMs. Finite State Machines. Given submodule mux32two: Instantiation of mux32two Give submodule mux32two: 2-to- MUX module mux32two (iput [3:] i,i, iput sel, output [3:] out); Module Istatiatio Fiite Machies esig methodology for sequetial logic -- idetify distict s -- create trasitio

More information

2 nd Semester 2009/2010

2 nd Semester 2009/2010 Chapter 16: Concurrency Control Departamento de Engenharia Informática Instituto Superior Técnico 2 nd Semester 2009/2010 Slides baseados nos slides oficiais do livro Database System Concepts c Silberschatz,

More information

CMSC Computer Architecture Lecture 12: Virtual Memory. Prof. Yanjing Li University of Chicago

CMSC Computer Architecture Lecture 12: Virtual Memory. Prof. Yanjing Li University of Chicago CMSC 22200 Computer Architecture Lecture 12: Virtual Memory Prof. Yajig Li Uiversity of Chicago A System with Physical Memory Oly Examples: most Cray machies early PCs Memory early all embedded systems

More information

Multiversion schemes keep old versions of data item to increase concurrency. Multiversion Timestamp Ordering Multiversion Two-Phase Locking Each

Multiversion schemes keep old versions of data item to increase concurrency. Multiversion Timestamp Ordering Multiversion Two-Phase Locking Each Multiversion schemes keep old versions of data item to increase concurrency. Multiversion Timestamp Ordering Multiversion Two-Phase Locking Each successful write results in the creation of a new version

More information

Energy-Efficient Transaction Management for Mobile Adhoc Network Databases

Energy-Efficient Transaction Management for Mobile Adhoc Network Databases Eergy-Efficiet Trasactio Maagemet for Mobile Adhoc Network Databases 1st Author 1st author's affiliatio 1st lie of address 2d lie of address Telephoe umber, icl. coutry code 1st author's email address

More information

Introduction to Wireless & Mobile Systems. Chapter 6. Multiple Radio Access Cengage Learning Engineering. All Rights Reserved.

Introduction to Wireless & Mobile Systems. Chapter 6. Multiple Radio Access Cengage Learning Engineering. All Rights Reserved. Itroductio to Wireless & Mobile Systems Chapter 6 Multiple Radio Access 1 Outlie Itroductio Multiple Radio Access Protocols Cotetio-based Protocols Pure ALOHA Slotted ALOHA CSMA (Carrier Sese Multiple

More information

Term Project Report. This component works to detect gesture from the patient as a sign of emergency message and send it to the emergency manager.

Term Project Report. This component works to detect gesture from the patient as a sign of emergency message and send it to the emergency manager. CS2310 Fial Project Loghao Li Term Project Report Itroductio I this project, I worked o expadig exercise 4. What I focused o is makig the real gesture recogizig sesor ad desig proper gestures ad recogizig

More information

Graph-based protocols are an alternative to two-phase locking Impose a partial ordering on the set D = {d 1, d 2,..., d h } of all data items.

Graph-based protocols are an alternative to two-phase locking Impose a partial ordering on the set D = {d 1, d 2,..., d h } of all data items. Graph-based protocols are an alternative to two-phase locking Impose a partial ordering on the set D = {d 1, d 2,..., d h } of all data items. If d i d j then any transaction accessing both d i and d j

More information

Symbolic Execution with Abstraction

Symbolic Execution with Abstraction Software Tools for Techology Trasfer mauscript No. (will be iserted by the editor) Symbolic Executio with Abstractio Saswat Aad 1, Coria S. Păsăreau 2, Willem Visser 3 1 College of Computig, Georgia Istitute

More information

Master Informatics Eng. 2017/18. A.J.Proença. Memory Hierarchy. (most slides are borrowed) AJProença, Advanced Architectures, MiEI, UMinho, 2017/18 1

Master Informatics Eng. 2017/18. A.J.Proença. Memory Hierarchy. (most slides are borrowed) AJProença, Advanced Architectures, MiEI, UMinho, 2017/18 1 Advaced Architectures Master Iformatics Eg. 2017/18 A.J.Proeça Memory Hierarchy (most slides are borrowed) AJProeça, Advaced Architectures, MiEI, UMiho, 2017/18 1 Itroductio Programmers wat ulimited amouts

More information

Chapter 12 : Concurrency Control

Chapter 12 : Concurrency Control Chapter 12 : Concurrency Control Chapter 12: Concurrency Control Lock-Based Protocols Timestamp-Based Protocols Validation-Based Protocols Multiple Granularity Multiversion Schemes Insert and Delete Operations

More information

Security of Bluetooth: An overview of Bluetooth Security

Security of Bluetooth: An overview of Bluetooth Security Versio 2 Security of Bluetooth: A overview of Bluetooth Security Marjaaa Träskbäck Departmet of Electrical ad Commuicatios Egieerig mtraskba@cc.hut.fi 52655H ABSTRACT The purpose of this paper is to give

More information

Lazy Type Changes in Object-oriented Database. Shan Ming Woo and Barbara Liskov MIT Lab. for Computer Science December 1999

Lazy Type Changes in Object-oriented Database. Shan Ming Woo and Barbara Liskov MIT Lab. for Computer Science December 1999 Lazy Type Chages i Object-orieted Database Sha Mig Woo ad Barbara Liskov MIT Lab. for Computer Sciece December 1999 Backgroud wbehavior of OODB apps compose of behavior of persistet obj wbehavior of objects

More information

Concurrency Control Overview. COSC 404 Database System Implementation. Concurrency Control. Lock-Based Protocols. Lock-Based Protocols (2)

Concurrency Control Overview. COSC 404 Database System Implementation. Concurrency Control. Lock-Based Protocols. Lock-Based Protocols (2) COSC 404 Database System Implementation Concurrency Control Dr. Ramon Lawrence University of British Columbia Okanagan ramon.lawrence@ubc.ca Concurrency Control Overview Concurrency control (CC) is a mechanism

More information

Concurrency control CS 417. Distributed Systems CS 417

Concurrency control CS 417. Distributed Systems CS 417 Concurrency control CS 417 Distributed Systems CS 417 1 Schedules Transactions must have scheduled so that data is serially equivalent Use mutual exclusion to ensure that only one transaction executes

More information

Design and Implementation of a Concurrency Control Mechanism in an Object-Oriented Database System

Design and Implementation of a Concurrency Control Mechanism in an Object-Oriented Database System Vol.ll No.4 J. of Comput. Sci. & Techol. Jul 1996 Desig ad Implemetatio of a Cocurrec Cotrol Mechaism i a Object-Orieted Database Sstem Qu Yuao (~~), Tia Zegpig (~il~), Wag Yuju (t-~n) ad Shi Baile (N

More information

Structuring Redundancy for Fault Tolerance. CSE 598D: Fault Tolerant Software

Structuring Redundancy for Fault Tolerance. CSE 598D: Fault Tolerant Software Structurig Redudacy for Fault Tolerace CSE 598D: Fault Tolerat Software What do we wat to achieve? Versios Damage Assessmet Versio 1 Error Detectio Iputs Versio 2 Voter Outputs State Restoratio Cotiued

More information

Python Programming: An Introduction to Computer Science

Python Programming: An Introduction to Computer Science Pytho Programmig: A Itroductio to Computer Sciece Chapter 1 Computers ad Programs 1 Objectives To uderstad the respective roles of hardware ad software i a computig system. To lear what computer scietists

More information

why study sorting? Sorting is a classic subject in computer science. There are three reasons for studying sorting algorithms.

why study sorting? Sorting is a classic subject in computer science. There are three reasons for studying sorting algorithms. Chapter 5 Sortig IST311 - CIS65/506 Clevelad State Uiversity Prof. Victor Matos Adapted from: Itroductio to Java Programmig: Comprehesive Versio, Eighth Editio by Y. Daiel Liag why study sortig? Sortig

More information

Concurrency Control. Chapter 17. Comp 521 Files and Databases Fall

Concurrency Control. Chapter 17. Comp 521 Files and Databases Fall Concurrency Control Chapter 17 Comp 521 Files and Databases Fall 2012 1 Conflict Serializable Schedules Recall conflicts (WR, RW, WW) were the cause of sequential inconsistency Two schedules are conflict

More information

DATA STRUCTURES. amortized analysis binomial heaps Fibonacci heaps union-find. Data structures. Appetizer. Appetizer

DATA STRUCTURES. amortized analysis binomial heaps Fibonacci heaps union-find. Data structures. Appetizer. Appetizer Data structures DATA STRUCTURES Static problems. Give a iput, produce a output. Ex. Sortig, FFT, edit distace, shortest paths, MST, max-flow,... amortized aalysis biomial heaps Fiboacci heaps uio-fid Dyamic

More information

Analysis of Algorithms

Analysis of Algorithms Presetatio for use with the textbook, Algorithm Desig ad Applicatios, by M. T. Goodrich ad R. Tamassia, Wiley, 2015 Aalysis of Algorithms Iput 2015 Goodrich ad Tamassia Algorithm Aalysis of Algorithms

More information

Using VTR Emulation on Avid Systems

Using VTR Emulation on Avid Systems Usig VTR Emulatio o Avid Systems VTR emulatio allows you to cotrol a sequece loaded i the Record moitor from a edit cotroller for playback i the edit room alog with other sources. I this sceario the edit

More information

Elementary Educational Computer

Elementary Educational Computer Chapter 5 Elemetary Educatioal Computer. Geeral structure of the Elemetary Educatioal Computer (EEC) The EEC coforms to the 5 uits structure defied by vo Neuma's model (.) All uits are preseted i a simplified

More information

Chapter 4 Threads. Operating Systems: Internals and Design Principles. Ninth Edition By William Stallings

Chapter 4 Threads. Operating Systems: Internals and Design Principles. Ninth Edition By William Stallings Operatig Systems: Iterals ad Desig Priciples Chapter 4 Threads Nith Editio By William Stalligs Processes ad Threads Resource Owership Process icludes a virtual address space to hold the process image The

More information

EE260: Digital Design, Spring /16/18. n Example: m 0 (=x 1 x 2 ) is adjacent to m 1 (=x 1 x 2 ) and m 2 (=x 1 x 2 ) but NOT m 3 (=x 1 x 2 )

EE260: Digital Design, Spring /16/18. n Example: m 0 (=x 1 x 2 ) is adjacent to m 1 (=x 1 x 2 ) and m 2 (=x 1 x 2 ) but NOT m 3 (=x 1 x 2 ) EE26: Digital Desig, Sprig 28 3/6/8 EE 26: Itroductio to Digital Desig Combiatioal Datapath Yao Zheg Departmet of Electrical Egieerig Uiversity of Hawaiʻi at Māoa Combiatioal Logic Blocks Multiplexer Ecoders/Decoders

More information

Announcements. Reading. Project #4 is on the web. Homework #1. Midterm #2. Chapter 4 ( ) Note policy about project #3 missing components

Announcements. Reading. Project #4 is on the web. Homework #1. Midterm #2. Chapter 4 ( ) Note policy about project #3 missing components Aoucemets Readig Chapter 4 (4.1-4.2) Project #4 is o the web ote policy about project #3 missig compoets Homework #1 Due 11/6/01 Chapter 6: 4, 12, 24, 37 Midterm #2 11/8/01 i class 1 Project #4 otes IPv6Iit,

More information

L6: FSMs and Synchronization

L6: FSMs and Synchronization L6: FSMs ad Sychroizatio Ackowledgemets: Materials i this lecture are courtesy of the followig sources ad are used with permissio. Rex Mi J. Rabaey, A. Chadrakasa, B. Nikolic. igital Itegrated Circuits:

More information

Programming with Shared Memory PART II. HPC Spring 2017 Prof. Robert van Engelen

Programming with Shared Memory PART II. HPC Spring 2017 Prof. Robert van Engelen Programmig with Shared Memory PART II HPC Sprig 2017 Prof. Robert va Egele Overview Sequetial cosistecy Parallel programmig costructs Depedece aalysis OpeMP Autoparallelizatio Further readig HPC Sprig

More information

Operating System Concepts. Operating System Concepts

Operating System Concepts. Operating System Concepts Chapter 4: Mass-Storage Systems Logical Disk Structure Logical Disk Structure Disk Schedulig Disk Maagemet RAID Structure Disk drives are addressed as large -dimesioal arrays of logical blocks, where the

More information

CIS 121. Introduction to Trees

CIS 121. Introduction to Trees CIS 121 Itroductio to Trees 1 Tree ADT Tree defiitio q A tree is a set of odes which may be empty q If ot empty, the there is a distiguished ode r, called root ad zero or more o-empty subtrees T 1, T 2,

More information

Fast Fourier Transform (FFT) Algorithms

Fast Fourier Transform (FFT) Algorithms Fast Fourier Trasform FFT Algorithms Relatio to the z-trasform elsewhere, ozero, z x z X x [ ] 2 ~ elsewhere,, ~ e j x X x x π j e z z X X π 2 ~ The DFS X represets evely spaced samples of the z- trasform

More information

Distributed Systems. 12. Concurrency Control. Paul Krzyzanowski. Rutgers University. Fall 2017

Distributed Systems. 12. Concurrency Control. Paul Krzyzanowski. Rutgers University. Fall 2017 Distributed Systems 12. Concurrency Control Paul Krzyzanowski Rutgers University Fall 2017 2014-2017 Paul Krzyzanowski 1 Why do we lock access to data? Locking (leasing) provides mutual exclusion Only

More information

Chapter 5. Functions for All Subtasks. Copyright 2015 Pearson Education, Ltd.. All rights reserved.

Chapter 5. Functions for All Subtasks. Copyright 2015 Pearson Education, Ltd.. All rights reserved. Chapter 5 Fuctios for All Subtasks Copyright 2015 Pearso Educatio, Ltd.. All rights reserved. Overview 5.1 void Fuctios 5.2 Call-By-Referece Parameters 5.3 Usig Procedural Abstractio 5.4 Testig ad Debuggig

More information

Priority Queues. Binary Heaps

Priority Queues. Binary Heaps Priority Queues Biary Heaps Priority Queues Priority: some property of a object that allows it to be prioritized with respect to other objects of the same type Mi Priority Queue: homogeeous collectio of

More information

A Reservation-Based Extended Transaction Protocol

A Reservation-Based Extended Transaction Protocol Clevelad State Uiversity EgagedScholarship@CSU Electrical Egieerig & Computer Sciece Faculty Publicatios Electrical Egieerig & Computer Sciece Departmet 2-2008 A Reservatio-Based Exteded Trasactio Protocol

More information

transaction - (another def) - the execution of a program that accesses or changes the contents of the database

transaction - (another def) - the execution of a program that accesses or changes the contents of the database Chapter 19-21 - Transaction Processing Concepts transaction - logical unit of database processing - becomes interesting only with multiprogramming - multiuser database - more than one transaction executing

More information

Polynomial Functions and Models. Learning Objectives. Polynomials. P (x) = a n x n + a n 1 x n a 1 x + a 0, a n 0

Polynomial Functions and Models. Learning Objectives. Polynomials. P (x) = a n x n + a n 1 x n a 1 x + a 0, a n 0 Polyomial Fuctios ad Models 1 Learig Objectives 1. Idetify polyomial fuctios ad their degree 2. Graph polyomial fuctios usig trasformatios 3. Idetify the real zeros of a polyomial fuctio ad their multiplicity

More information

Concurrency Control. Chapter 17. Comp 521 Files and Databases Spring

Concurrency Control. Chapter 17. Comp 521 Files and Databases Spring Concurrency Control Chapter 17 Comp 521 Files and Databases Spring 2010 1 Conflict Serializable Schedules Recall conflicts (WW, RW, WW) were the cause of sequential inconsistency Two schedules are conflict

More information

. Written in factored form it is easy to see that the roots are 2, 2, i,

. Written in factored form it is easy to see that the roots are 2, 2, i, CMPS A Itroductio to Programmig Programmig Assigmet 4 I this assigmet you will write a java program that determies the real roots of a polyomial that lie withi a specified rage. Recall that the roots (or

More information

A lock is a mechanism to control concurrent access to a data item Data items can be locked in two modes:

A lock is a mechanism to control concurrent access to a data item Data items can be locked in two modes: Concurrency Control Concurrency Control Lock-Based and Tree-Based Protocols Timestamp-Based Protocols Validation-Based Protocols Multiple Granularity Multiversion Schemes Insert and Delete Operations Concurrency

More information

The University of Adelaide, School of Computer Science 22 November Computer Architecture. A Quantitative Approach, Sixth Edition.

The University of Adelaide, School of Computer Science 22 November Computer Architecture. A Quantitative Approach, Sixth Edition. Computer Architecture A Quatitative Approach, Sixth Editio Chapter 2 Memory Hierarchy Desig 1 Itroductio Programmers wat ulimited amouts of memory with low latecy Fast memory techology is more expesive

More information

Automatic Generation of Minimal and Safe Transactions in Conceptual Database Design

Automatic Generation of Minimal and Safe Transactions in Conceptual Database Design Automatic Geeratio of Miimal ad Safe Trasactios i Coceptual Database Desig M. A. Pastor, M. Celma-Giméez, L. Mota-Herraz Departameto de Sistemas Iformáticos y Computació; Uiversidad Politécica de Valecia

More information

Advanced Databases. Lecture 9- Concurrency Control (continued) Masood Niazi Torshiz Islamic Azad University- Mashhad Branch

Advanced Databases. Lecture 9- Concurrency Control (continued) Masood Niazi Torshiz Islamic Azad University- Mashhad Branch Advanced Databases Lecture 9- Concurrency Control (continued) Masood Niazi Torshiz Islamic Azad University- Mashhad Branch www.mniazi.ir Multiple Granularity Allow data items to be of various sizes and

More information

WYSE Academic Challenge Sectional Computer Science 2005 SOLUTION SET

WYSE Academic Challenge Sectional Computer Science 2005 SOLUTION SET WYSE Academic Challege Sectioal Computer Sciece 2005 SOLUTION SET 1. Correct aswer: a. Hz = cycle / secod. CPI = 2, therefore, CPI*I = 2 * 28 X 10 8 istructios = 56 X 10 8 cycles. The clock rate is 56

More information

Heaps. Presentation for use with the textbook Algorithm Design and Applications, by M. T. Goodrich and R. Tamassia, Wiley, 2015

Heaps. Presentation for use with the textbook Algorithm Design and Applications, by M. T. Goodrich and R. Tamassia, Wiley, 2015 Presetatio for use with the textbook Algorithm Desig ad Applicatios, by M. T. Goodrich ad R. Tamassia, Wiley, 201 Heaps 201 Goodrich ad Tamassia xkcd. http://xkcd.com/83/. Tree. Used with permissio uder

More information