Distributed Transactions. CS5204 Operating Systems 1

Size: px
Start display at page:

Download "Distributed Transactions. CS5204 Operating Systems 1"

Transcription

1 Distributed Transactions CS5204 Operating Systems 1

2 . Transactions transactions T. TM T Distributed DBMS Model data manager DM T. TM T transaction manager network DM TM DM T T physical database CS 5204 Operating Systems 2

3 Serialization T 1 : T 2 : T 3 : log : concurrent execution DB CS 5204 Operating Systems 3

4 T 1 : T 2 : T 3 : log : Serialization concurrent execution DB OPERATIONS READ(X): WRITE (Z): read any one copy of X R 1 (X 3 ) write all copies of Z W 3 (Z 2 ) and W 3 (Z 3 ) CS 5204 Operating Systems 4

5 T 1 : T 2 : T 3 : log : Serialization concurrent execution DB is acceptable if it is guaranteed to have resulted from any one of: T 1 T 2 T 3 T 2 T 1 T 3 T 2 T 3 T 1 T 1 T 3 T 2 T 3 T 1 T 2 T 3 T 2 T 1 DB CS 5204 Operating Systems 5

6 Serialization Consider two concurrent transactions executed at only one DM LOG: R 1 (X) R 2 (Y) R 1 (Y) W 1 (Z) W 1 (X) W 2 (X) R 2 (Z) CS 5204 Operating Systems 6

7 Serialization Consider two concurrent transactions executed at only one DM LOG: R 1 (X) R 2 (Y) R 1 (Y) W 1 (Z) W 1 (X) W 2 (X) R 2 (Z) Serial Order: R 2 (Y) W 2 (X) R 2 (Z) ; R 1 (X) R 1 (Y) W 1 (Z) W 1 (X) CS 5204 Operating Systems 7

8 Serialization Consider two concurrent transactions executed at only one DM 2 LOG: R 1 (X) R 2 (Y) R 1 (Y) W 1 (Z) W 1 (X) W 2 (X) R 2 (Z) Serial Order: 2 R 2 (Y) W 2 (X) R 2 (Z) ; R 1 (X) R 1 (Y) W 1 (Z) W 1 (X) last write conflict read source conflict CS 5204 Operating Systems 8

9 Serialization Consider two concurrent transactions executed at only one DM LOG: R 1 (X) R 2 (Y) R 1 (Y) W 1 (Z) W 1 (X) W 2 (X) R 2 (Z) Serial Order: R 1 (X) R 1 (Y) W 1 (Z) W 1 (X) ; R 2 (Y) W 2 (X) R 2 (Z) CS 5204 Operating Systems 9

10 Serialization Consider two concurrent transactions executed at only one DM LOG: R 1 (X) R 2 (Y) R 1 (Y) W 1 (Z) W 1 (X) W 2 (X) R 2 (Z) Serial Order: R 1 (X) R 1 (Y) W 1 (Z) W 1 (X) ; R 2 (Y) W 2 (X) R 2 (Z) CS 5204 Operating Systems 10

11 Distributed Transaction Processing Transactions: T 1 : READ(X); WRITE(Y); T 2 : READ(Y); WRITE(Z); DM 1 DM 2 Y 2 Z 2 X 1 Y 1 T 3 : READ(Z); WRITE(X); DM 3 Z 3 X 3 CS 5204 Operating Systems 11

12 Transactions: Distributed Transaction Processing T 1 : READ(X); WRITE(Y); T 2 : READ(Y); WRITE(Z); T 3 : READ(Z); WRITE(X); DM 1 DM 2 DM 3 Y 2 Z 2 X 1 Y 1 Z 3 X 3 LOGS: L 1 : R 2 (Y 1 ) R 1 (X 1 ) W 1 (Y 1 ) W 3 (X 1 ) L 2 : R 3 (Z 2 ) W 2 (Z 2 ) W 1 (Y 2 ) L 3 : W 3 (X 3 ) W 2 (Z 3 ) CS 5204 Operating Systems 12

13 Distributed Transaction Processing Transactions Transactions: T 1 : READ(X); WRITE(Y); T 2 : READ(Y); WRITE(Z); DM 1 DM 2 Y 2 Z 2 X 1 Y 1 T 3 : READ(Z); WRITE(X); DM 3 Z 3 X 3 LOGS: L 1 : R 2 (Y 1 ) R 1 (X 1 ) W 1 (Y 1 ) W 3 (X 1 ) L 2 : R 3 (Z 2 ) W 2 (Z 2 ) W 1 (Y 2 ) L 3 : W 3 (X 3 ) W 2 (Z 3 ) Question: Are these logs equivalent to some serial execution of the transactions? CS 5204 Operating Systems 13

14 Serialization of Distributed Logs Transactions Conflict: P j (A X ) and Q i (B Y ) conflict if (1) P and Q are not both READ, and (2) A = B (same data item), and (3) i j (different transactions), and (4) X = Y (same data manager/log) CS 5204 Operating Systems 14

15 Serialization of Distributed Logs Conflict: P j (A X ) and Q i (B Y ) conflict if (1) P and Q are not both READ, and (2) A = B, and (3) i j, and (4) X = Y LOGS: L 1 : R 2 (Y 1 ) R 1 (X 1 ) W 1 (Y 1 ) W 3 (X 1 ) L 2 : R 3 (Z 2 ) W 2 (Z 2 ) W 1 (Y 2 ) L 3 : W 3 (X 3 ) W 2 (Z 3 ) Transactions CS 5204 Operating Systems 15

16 Serialization of Distributed Logs Conflict: P j (A X ) and Q i (B Y ) conflict if LOGS: (1) P and Q are not both READ, and (2) A = B, and (3) i j, and (4) X = Y L 1 : R 2 (Y 1 ) R 1 (X 1 ) W 1 (Y 1 ) W 3 (X 1 ) L 2 : R 3 (Z 2 ) W 2 (Z 2 ) W 1 (Y 2 ) 1 3 L 3 : W 3 (X 3 ) W 2 (Z 3 ) 2 Transactions CS 5204 Operating Systems 16

17 Serialization of Distributed Logs Conflict: P j (A X ) and Q i (B Y ) conflict if (1) P and Q are not both READ, and (2) A = B, and (3) i j, and (4) X = Y Transactions LOGS: 2 L 1 : R 2 (Y 1 ) R 1 (X 1 ) W 1 (Y 1 ) W 3 (X 1 ) L 2 : R 3 (Z 2 ) W 2 (Z 2 ) W 1 (Y 2 ) 1 3 L 3 : W 3 (X 3 ) W 2 (Z 3 ) => T 1 T 3 => T 2 T 1 => T 3 T 2 Contradictory No total order Not serializable CS 5204 Operating Systems 17

18 Serialization of Distributed Logs Transactions Theorem: Distributed logs are serializable if there exists a total ordering of the transactions such that for conflicting operations P j and Q i a log shows P j Q i only if T j T i LOGS: 2 L 1 : R 2 (Y 1 ) R 1 (X 1 ) W 1 (Y 1 ) W 3 (X 1 ) L 2 : R 3 (Z 2 ) W 2 (Z 2 ) W 1 (Y 2 ) 1 3 L 3 : W 3 (X 3 ) W 2 (Z 3 ) => T 1 T 3 => T 2 T 1 => T 3 T 2 Contradictory No total order Not serializable CS 5204 Operating Systems 18

19 Locking transactions must use Two Phase Locking (2PL) locking phase release phase T i time no locks released no new locks requested only the following lock requests are granted current lock state lock request not locked READ locked WRITE locked READ OK OK DENY WRITE OK DENY DENY CS 5204 Operating Systems 19

20 Locking T i R i (X) W i (Y) lock(x) lock(y) release(x,y) concurrency controller request lock before accessing a data item release all locks at the end of transaction This guarantees serializability [ESWAREN] CS 5204 Operating Systems 20

21 Effects of Locking L 1 : R 2 (Y 1 ) Suppose the transactions have executed to this point: L 2 : R 3 (Z 2 ) L 3 : W 3 (X 3 ) The locks are then: Lock for Lock state Waiting for lock X write-locked by T 3 T 1 Y read-locked by T 2 Z read-locked by T 3 T 2 Only T 3 is able to execute; it will complete its write and release its locks, leading to CS 5204 Operating Systems 21

22 Effects of Locking L 1 : R 2 (Y 1 ), W 3 (X 1 ) these logs, and L 2 : R 3 (Z 2 ) L 3 : W 3 (X 3 ) this lock state: Lock for Lock state Waiting for lock X unlocked T 1 Y read-locked by T 2 Z unlocked T 2 Both T 1 and T 2 can acquire the locks needed to execute their next actions, resulting in CS 5204 Operating Systems 22

23 Effects of Locking L 1 : R 2 (Y 1 ), W 3 (X 1 ), R 1 (X 1 ) these logs, and L 2 : R 3 (Z 2 ), W 2 (Z 2 ) L 3 : W 3 (X 3 ), W 2 (Z 3 ) this lock state: Lock for Lock state Waiting for lock X read-locked by T 1 Y read-locked by T 2 T 1 Z write-locked by T 2 Transaction T 2 completes, releases its lock - resulting in CS 5204 Operating Systems 23

24 Effects of Locking this lock state: Lock for Lock state Waiting for lock X read-locked by T 1 Y unlocked T 1 Z unlocked At this point, T 1 can acquire the write-lock on Y, perform its write operations and complete, leading to the final serializable logs: L 1 : R 2 (Y 1 ), W 3 (X 1 ), R 1 (X1), W 1 (Y 1 ) L 2 : R 3 (Z 2 ), W 2 (Z 2 ), W 1 (Y 2 ) L 3 : W 3 (X 3 ), W 2 (Z 3 ) CS 5204 Operating Systems 24

Transaction Processing

Transaction Processing Transaction Processing As part of DB Implementation Techniques - Wintersemester 2010/2011 Prof. Dr.-Ing. Hagen Höpfner, Juniorprofessur Mobile Media, BU Weimar This set of slides is based on slides by

More information

Transactional Information Systems:

Transactional Information Systems: Transactional Information Systems: Theory, Algorithms, and the Practice of Concurrency Control and Recovery Gerhard Weikum and Gottfried Vossen 2002 Morgan Kaufmann ISBN 1-55860-508-8 Teamwork is essential.

More information

arxiv: v1 [cs.dc] 9 Feb 2015

arxiv: v1 [cs.dc] 9 Feb 2015 Why Transactional Memory Should Not Be Obstruction-Free Petr Kuznetsov 1 Srivatsan Ravi 2 1 Télécom ParisTech 2 TU Berlin arxiv:1502.02725v1 [cs.dc] 9 Feb 2015 Abstract Transactional memory (TM) is an

More information

1 st Semester 2007/2008

1 st Semester 2007/2008 Chapter 17: System Departamento de Engenharia Informática Instituto Superior Técnico 1 st Semester 2007/2008 Slides baseados nos slides oficiais do livro Database System c Silberschatz, Korth and Sudarshan.

More information

CS 6112 (Fall 2011) Foundations of Concurrency

CS 6112 (Fall 2011) Foundations of Concurrency CS 6112 (Fall 2011) Foundations of Concurrency 29 November 2011 Scribe: Jean-Baptiste Jeannin 1 Readings The readings for today were: Eventually Consistent Transactions, by Sebastian Burckhardt, Manuel

More information

DMP. Deterministic Shared Memory Multiprocessing. Presenter: Wu, Weiyi Yale University

DMP. Deterministic Shared Memory Multiprocessing. Presenter: Wu, Weiyi Yale University DMP Deterministic Shared Memory Multiprocessing 1 Presenter: Wu, Weiyi Yale University Outline What is determinism? How to make execution deterministic? What s the overhead of determinism? 2 What Is Determinism?

More information

Lecture Note #6: More on Task Scheduling EECS 571 Principles of Real-Time Embedded Systems Kang G. Shin EECS Department University of Michigan

Lecture Note #6: More on Task Scheduling EECS 571 Principles of Real-Time Embedded Systems Kang G. Shin EECS Department University of Michigan Lecture Note #6: More on Task Scheduling EECS 571 Principles of Real-Time Embedded Systems Kang G. Shin EECS Department University of Michigan Note 6-1 Mars Pathfinder Timing Hiccups? When: landed on the

More information

Proving Programs Correct

Proving Programs Correct Proving Programs Correct Page 1 of 9 Proving Programs Correct How can we be sure that a piece of code does what we want it to do? One way is to try testing the code on a large group of data. Another is

More information

Robustness against Consistency Models with Atomic Visibility

Robustness against Consistency Models with Atomic Visibility Robustness against Consistency Models with Atomic Visibility Giovanni Bernardi and Alexey Gotsman IMDEA Software Institute, Madrid, Spain Abstract To achieve scalability, modern Internet services often

More information

Quiz 2. Due November 26th, CS525 - Advanced Database Organization Solutions

Quiz 2. Due November 26th, CS525 - Advanced Database Organization Solutions Name CWID Quiz 2 Due November 26th, 2015 CS525 - Advanced Database Organization s Please leave this empty! 1 2 3 4 5 6 7 Sum Instructions Multiple choice questions are graded in the following way: You

More information

Transaction Chopping for Parallel Snapshot Isolation

Transaction Chopping for Parallel Snapshot Isolation Transaction Chopping for Parallel Snapshot Isolation Andrea Cerone 1, Alexey Gotsman 1, and Hongseok Yang 2 1 IMDEA Software Institute 2 University of Oxford Abstract. Modern Internet services often achieve

More information

Data Mining. Dr. Raed Ibraheem Hamed. University of Human Development, College of Science and Technology Department of Computer Science

Data Mining. Dr. Raed Ibraheem Hamed. University of Human Development, College of Science and Technology Department of Computer Science Data Mining Dr. Raed Ibraheem Hamed University of Human Development, College of Science and Technology Department of Computer Science 2016 2017 Road map The Apriori algorithm Step 1: Mining all frequent

More information

Lecture 4: Process Management

Lecture 4: Process Management Lecture 4: Process Management Process Revisited 1. What do we know so far about Linux on X-86? X-86 architecture supports both segmentation and paging. 48-bit logical address goes through the segmentation

More information

Safety and Liveness. Thread Synchronization: Too Much Milk. Critical Sections. A Really Cool Theorem

Safety and Liveness. Thread Synchronization: Too Much Milk. Critical Sections. A Really Cool Theorem Safety and Liveness Properties defined over an execution of a program Thread Synchronization: Too Much Milk Safety: nothing bad happens holds in every finite execution prefix Windows never crashes No patient

More information

Real-Time Software Transactional Memory: Contention Managers, Time Bounds, and Implementations

Real-Time Software Transactional Memory: Contention Managers, Time Bounds, and Implementations Real-Time Software Transactional Memory: Contention Managers, Time Bounds, and Implementations Mohammed El-Shambakey Dissertation Submitted to the Faculty of the Virginia Polytechnic Institute and State

More information

Separation Logic and Graphical Models

Separation Logic and Graphical Models Separation Logic and Graphical Models John Wickerson and Tony Hoare Semantics Lunch, 25th October 2010 1 Trace composition Problem: Composition is non-deterministic. 2 Trace composition Problem: Composition

More information

Real Time Operating Systems

Real Time Operating Systems Real Time Operating ystems Luca Abeni luca.abeni@unitn.it Interacting Tasks Until now, only independent tasks... A job never blocks or suspends A task only blocks on job termination In real world, jobs

More information

CS-206 Concurrency. Lecture 8 Concurrent. Data structures. a b c d. Spring 2015 Prof. Babak Falsafi parsa.epfl.ch/courses/cs206/ remove(c) remove(b)

CS-206 Concurrency. Lecture 8 Concurrent. Data structures. a b c d. Spring 2015 Prof. Babak Falsafi parsa.epfl.ch/courses/cs206/ remove(c) remove(b) CS-206 Concurrency Lecture 8 Concurrent a b c d Data structures Spring 2015 Prof. Babak Falsafi parsa.epfl.ch/courses/cs206/ remove(b) remove(c) Adapted from slides originally developed by Maurice Herlihy

More information

Distributed Computing in Shared Memory and Networks

Distributed Computing in Shared Memory and Networks Distributed Computing in Shared Memory and Networks Class 2: Consensus WEP 2018 KAUST This class Reaching agreement in shared memory: Consensus ü Impossibility of wait-free consensus 1-resilient consensus

More information

Leveraging Transactional Memory for a Predictable Execution of Applications Composed of Hard Real-Time and Best-Effort Tasks

Leveraging Transactional Memory for a Predictable Execution of Applications Composed of Hard Real-Time and Best-Effort Tasks Leveraging Transactional Memory for a Predictable Execution of Applications Composed of Hard Real-Time and Best-Effort Tasks Stefan Metzlaff, Sebastian Weis, and Theo Ungerer Department of Computer Science,

More information

arxiv: v2 [cs.dc] 20 Nov 2017

arxiv: v2 [cs.dc] 20 Nov 2017 The Optimal Pessimistic Transactional Memory Algorithm arxiv:1605.01361v2 [cs.dc] 20 Nov 2017 Paweł T. Wojciechowski, Konrad Siek {pawel.t.wojciechowski,konrad.siek}@cs.put.edu.pl Institute of Computing

More information

Shared resources. Sistemi in tempo reale. Giuseppe Lipari. Scuola Superiore Sant Anna Pisa -Italy

Shared resources. Sistemi in tempo reale. Giuseppe Lipari. Scuola Superiore Sant Anna Pisa -Italy istemi in tempo reale hared resources Giuseppe Lipari cuola uperiore ant Anna Pisa -Italy inher.tex istemi in tempo reale Giuseppe Lipari 7/6/2005 12:35 p. 1/21 Interacting tasks Until now, we have considered

More information

Online Appendix to: Types for Atomicity: Static Checking and Inference for Java

Online Appendix to: Types for Atomicity: Static Checking and Inference for Java Online Appendix to: Types for Atomicity: Static Checking and Inference for Java CORMAC FLANAGAN University of California at Santa Cruz STEPHEN N. FREUND and MARINA LIFSHIN Williams College and SHAZ QADEER

More information

Technical Report Sequential Proximity

Technical Report Sequential Proximity Technical Report Sequential Proximity Towards Provably Scalable Concurrent Search Algorithms Karolos Antoniadis, Rachid Guerraoui, Julien Stainer, and Vasileios Trigonakis École Polytechnique Fédérale

More information

Distributed Systems Part II Solution to Exercise Sheet 10

Distributed Systems Part II Solution to Exercise Sheet 10 Distributed Computing HS 2012 Prof. R. Wattenhofer / C. Decker Distributed Systems Part II Solution to Exercise Sheet 10 1 Spin Locks A read-write lock is a lock that allows either multiple processes to

More information

Seeing is Believing: A Client-Centric Specification of Database Isolation

Seeing is Believing: A Client-Centric Specification of Database Isolation Seeing is Believing: A Client-Centric Specification of Database Isolation Natacha Crooks The University of Texas at Austin and Cornell University Lorenzo Alvisi The University of Texas at Austin and Cornell

More information

Financial. Analysis. O.Eval = {Low, High} Store. Bid. Update. Risk. Technical. Evaluation. External Consultant

Financial. Analysis. O.Eval = {Low, High} Store. Bid. Update. Risk. Technical. Evaluation. External Consultant ACM PODS98 of CS Dept at Stony Brook University Based Modeling and Analysis of Logic Workows Hasan Davulcu* N.Y. 11794, U.S.A. * Joint with M. Kifer, C.R. Ramakrishnan, I.V. Ramakrishnan Hasan Davulcu

More information

Clojure Concurrency Constructs, Part Two. CSCI 5828: Foundations of Software Engineering Lecture 13 10/07/2014

Clojure Concurrency Constructs, Part Two. CSCI 5828: Foundations of Software Engineering Lecture 13 10/07/2014 Clojure Concurrency Constructs, Part Two CSCI 5828: Foundations of Software Engineering Lecture 13 10/07/2014 1 Goals Cover the material presented in Chapter 4, of our concurrency textbook In particular,

More information

CPU Scheduling. CPU Scheduler

CPU Scheduling. CPU Scheduler CPU Scheduling These slides are created by Dr. Huang of George Mason University. Students registered in Dr. Huang s courses at GMU can make a single machine readable copy and print a single copy of each

More information

Multidomain Design and Optimization based on COMSOL Multiphysics: Applications for Mechatronic Devices Ara Bissal, Octavian Craciun, Veronica

Multidomain Design and Optimization based on COMSOL Multiphysics: Applications for Mechatronic Devices Ara Bissal, Octavian Craciun, Veronica Multidomain Design and Optimization based on COMSOL Multiphysics: Applications for Mechatronic Devices Ara Bissal, Octavian Craciun, Veronica Biagini, & Jesper Magnusson Table of contents Introduction

More information

Improper Nesting Example

Improper Nesting Example Improper Nesting Example One of the limits on the use of parbegin/parend, and any related constructs, is that the program involved must be properly nested. Not all programs are. For example, consider the

More information

arxiv: v1 [cs.dc] 26 Nov 2018

arxiv: v1 [cs.dc] 26 Nov 2018 The SNOW Theorem Revisited Kishori M Konwar, Wyatt Lloyd, Haonan Lu, Nancy Lynch November 27, 2018 arxiv:1811.10577v1 [cs.dc] 26 Nov 2018 Abstract In highly-scalable storage systems for Web services, data

More information

I reduce synchronization costs in parallel computations by

I reduce synchronization costs in parallel computations by IEEE TRANSACTIONS ON PARALLEL AND DISTRIBUTED SYSTEMS, VOL. 8, NO. 4, APRIL 1997 337 Isotach Networks Paul F. Reynolds, Jr., Member, /E Computer Society Craig Williams, and Raymond R. Wagner, Jr. Abstract-We

More information

A Framework for Transactional Consistency Models with Atomic Visibility

A Framework for Transactional Consistency Models with Atomic Visibility A Framework for Transactional Consistency Models with Atomic Visibility Andrea Cerone, Giovanni Bernardi, and Alexey Gotsman IMDEA Software Institute, Madrid, Spain Abstract Modern distributed systems

More information

Scheduling I. Today. Next Time. ! Introduction to scheduling! Classical algorithms. ! Advanced topics on scheduling

Scheduling I. Today. Next Time. ! Introduction to scheduling! Classical algorithms. ! Advanced topics on scheduling Scheduling I Today! Introduction to scheduling! Classical algorithms Next Time! Advanced topics on scheduling Scheduling out there! You are the manager of a supermarket (ok, things don t always turn out

More information

CS 347 Parallel and Distributed Data Processing

CS 347 Parallel and Distributed Data Processing CS 347 Parallel and Distributed Data Processing Spring 2016 & Clocks, Clocks, and the Ordering of Events in a Distributed System. L. Lamport, Communications of the ACM, 1978 Notes 15: & Clocks CS 347 Notes

More information

INF Models of concurrency

INF Models of concurrency Monitors INF4140 - Models of concurrency Monitors, lecture 4 Fall 2017 27. September 2017 2 / 49 Overview Concurrent execution of different processes Communication by shared variables Processes may interfere

More information

State Graphs FSMs. Page 1

State Graphs FSMs. Page 1 State Graphs FSMs Page 1 Binary Counter State Graph 00 Q1 Q0 N1 N0 0 0 0 1 0 1 1 0 1 0 1 1 1 1 0 0 11 01 State graphs are graphical representations of TT s They contain the same information: no more, no

More information

Real Time Operating Systems

Real Time Operating Systems Real Time Operating ystems hared Resources Luca Abeni Credits: Luigi Palopoli, Giuseppe Lipari, and Marco Di Natale cuola uperiore ant Anna Pisa -Italy Real Time Operating ystems p. 1 Interacting Tasks

More information

Maximal Causal Models for Sequentially Consistent Multithreaded Systems

Maximal Causal Models for Sequentially Consistent Multithreaded Systems Maximal Causal Models for Sequentially Consistent Multithreaded Systems Traian Florin Șerbănuță, Feng Chen, and Grigore Roșu Department of Computer Science University of Illinois at Urbana-Champaign {tserban2,fengchen,grosu}@illinois.edu

More information

Maps performance tips On server: Maintain DB connections, prepared statements (per thread/request!)

Maps performance tips On server: Maintain DB connections, prepared statements (per thread/request!) Announcements Maps performance tips On server: Maintain DB connections, prepared statements (per thread/request!) Use Spark.before, Spark.after to open and close. Use ThreadLocal, or pass the connection

More information

Do we have a quorum?

Do we have a quorum? Do we have a quorum? Quorum Systems Given a set U of servers, U = n: A quorum system is a set Q 2 U such that Q 1, Q 2 Q : Q 1 Q 2 Each Q in Q is a quorum How quorum systems work: A read/write shared register

More information

Type-Based Information Flow Analysis for the Pi-Calculus

Type-Based Information Flow Analysis for the Pi-Calculus Acta Informatica manuscript No. (will be inserted by the editor) Naoki Kobayashi Type-Based Information Flow Analysis for the Pi-Calculus Received: date / Revised: date Abstract We propose a new type system

More information

INF 4140: Models of Concurrency Series 3

INF 4140: Models of Concurrency Series 3 Universitetet i Oslo Institutt for Informatikk PMA Olaf Owe, Martin Steffen, Toktam Ramezani INF 4140: Models of Concurrency Høst 2016 Series 3 14. 9. 2016 Topic: Semaphores (Exercises with hints for solution)

More information

Section 6 Fault-Tolerant Consensus

Section 6 Fault-Tolerant Consensus Section 6 Fault-Tolerant Consensus CS586 - Panagiota Fatourou 1 Description of the Problem Consensus Each process starts with an individual input from a particular value set V. Processes may fail by crashing.

More information

FACTORS AFFECTING CONCURRENT TRUNCATE

FACTORS AFFECTING CONCURRENT TRUNCATE T E C H N I C A L N O T E FACTORS AFFECTING CONCURRENT TRUNCATE DURING BATCH PROCESSES Prepared By David Kurtz, Go-Faster Consultancy Ltd. Technical Note Version 1.00 Thursday 2 April 2009 (E-mail: david.kurtz@go-faster.co.uk,

More information

Scheduling Slack Time in Fixed Priority Pre-emptive Systems

Scheduling Slack Time in Fixed Priority Pre-emptive Systems Scheduling Slack Time in Fixed Priority Pre-emptive Systems R.I.Davis Real-Time Systems Research Group, Department of Computer Science, University of York, England. ABSTRACT This report addresses the problem

More information

CSE-4412(M) Midterm. There are five major questions, each worth 10 points, for a total of 50 points. Points for each sub-question are as indicated.

CSE-4412(M) Midterm. There are five major questions, each worth 10 points, for a total of 50 points. Points for each sub-question are as indicated. 22 February 2007 CSE-4412(M) Midterm p. 1 of 12 CSE-4412(M) Midterm Sur / Last Name: Given / First Name: Student ID: Instructor: Parke Godfrey Exam Duration: 75 minutes Term: Winter 2007 Answer the following

More information

Efficient Algorithms for Checking the Atomicity of a Run of Read and Write Operations

Efficient Algorithms for Checking the Atomicity of a Run of Read and Write Operations 1 Acta Informatica (Springer-Verlag) 32, pp.155-170, 1995 Efficient Algorithms for Checking the Atomicity of a Run of Read and Write Operations Lefteris M. Kirousis 1,2,3 Andreas G. Veneris 4,5 January

More information

Solutions. 9. Ans. C. Memory size. 11. Ans. D. a b c d e f a d e b c f a b d c e f a d b c e f a b d e c f a d b e c f. 13. Ans. D. Merge sort n log n

Solutions. 9. Ans. C. Memory size. 11. Ans. D. a b c d e f a d e b c f a b d c e f a d b c e f a b d e c f a d b e c f. 13. Ans. D. Merge sort n log n Solutions. Ans. B. ~ p q ~ r ~ s ~ p q r s ~ ~ p q r s p ~ q r s ~ p q ~ r v ~ s For x only the above compound preposition is true.. Ans. B. Case I First bit is 0 Case II First bit is 6. Ans. A. # has

More information

Distributed Deadlock-Avoidance. IMDEA Software Institute, Spain

Distributed Deadlock-Avoidance. IMDEA Software Institute, Spain Distributed Deadlock-voidance César Sánchez IMDE Software Institute, Spain DRV Workshop, ertinoro 19-May, 216 Distributed Deadlock-voidance little story about how static knowledge can help solve unsolvable

More information

Deadlock (2) Dave Eckhardt Brian Railing Roger Dannenberg

Deadlock (2) Dave Eckhardt Brian Railing Roger Dannenberg Deadlock () Dave Eckhardt Brian Railing Roger Dannenberg 1 1-410, S'18 Synchronization P You should really have, today: Drawn pictures of thread stacks (even if not perfect) Figured out where stubs belong,

More information

Parameterised! Linearisability Andrea Cerone

Parameterised! Linearisability Andrea Cerone ised! Linearisability Andrea Cerone Joint work with Alexey Gotsman and Hongseok Yang ICALP - Copenhagen, July 8th, 2014 A Simple Example Converting a sequential data structure into a concurrent one Trivial

More information

AGREEMENT PROBLEMS (1) Agreement problems arise in many practical applications:

AGREEMENT PROBLEMS (1) Agreement problems arise in many practical applications: AGREEMENT PROBLEMS (1) AGREEMENT PROBLEMS Agreement problems arise in many practical applications: agreement on whether to commit or abort the results of a distributed atomic action (e.g. database transaction)

More information

Databases 2012 Normalization

Databases 2012 Normalization Databases 2012 Christian S. Jensen Computer Science, Aarhus University Overview Review of redundancy anomalies and decomposition Boyce-Codd Normal Form Motivation for Third Normal Form Third Normal Form

More information

Progressive & Algorithms & Systems

Progressive & Algorithms & Systems University of California Merced Lawrence Berkeley National Laboratory Progressive Computation for Data Exploration Progressive Computation Online Aggregation (OLA) in DB Query Result Estimate Result ε

More information

Directed Topology and Concurrency Theory.

Directed Topology and Concurrency Theory. Directed Topology and Concurrency Theory. Lisbeth Fajstrup Department of Mathematics alborg University Denmark Sapporo 2017 Directed Topology/Concurrency Take home message: Models of concurrency geometry/topology

More information

The FMLP + : An Asymptotically Optimal Real-Time Locking Protocol for Suspension-Aware Analysis

The FMLP + : An Asymptotically Optimal Real-Time Locking Protocol for Suspension-Aware Analysis The FMLP + : An Asymptotically Optimal Real-Time Locking Protocol for Suspension-Aware Analysis Björn B. Brandenburg Max Planck Institute for Software Systems (MPI-SWS) Abstract Multiprocessor real-time

More information

Scheduling I. Today Introduction to scheduling Classical algorithms. Next Time Advanced topics on scheduling

Scheduling I. Today Introduction to scheduling Classical algorithms. Next Time Advanced topics on scheduling Scheduling I Today Introduction to scheduling Classical algorithms Next Time Advanced topics on scheduling Scheduling out there You are the manager of a supermarket (ok, things don t always turn out the

More information

Operating Systems. VII. Synchronization

Operating Systems. VII. Synchronization Operating Systems VII. Synchronization Ludovic Apvrille ludovic.apvrille@telecom-paristech.fr Eurecom, office 470 http://soc.eurecom.fr/os/ @OS Eurecom Outline Synchronization issues 2/22 Fall 2017 Institut

More information

Algebraic Specification of Serializability for Partitioned Transactions

Algebraic Specification of Serializability for Partitioned Transactions INTERNATIONAL JOURNAL OF COMPUTER SCIENCE ISSN 1306-4428 1 Algebraic Specification of Serializability for Partitioned Transactions Walter Hussak and John Keane Abstract The usual correctness condition

More information

Consensus and Universal Construction"

Consensus and Universal Construction Consensus and Universal Construction INF346, 2015 So far Shared-memory communication: safe bits => multi-valued atomic registers atomic registers => atomic/immediate snapshot 2 Today Reaching agreement

More information

SERIALLY PROGRAMMABLE CLOCK SOURCE. Features

SERIALLY PROGRAMMABLE CLOCK SOURCE. Features DATASHEET ICS307-03 Description The ICS307-03 is a dynamic, serially programmable clock source which is flexible and takes up minimal board space. Output frequencies are programmed via a 3-wire SPI port.

More information

Asynchronous Communication 2

Asynchronous Communication 2 Asynchronous Communication 2 INF4140 22.11.12 Lecture 11 INF4140 (22.11.12) Asynchronous Communication 2 Lecture 11 1 / 37 Overview: Last time semantics: histories and trace sets specification: invariants

More information

Lecture 13. Real-Time Scheduling. Daniel Kästner AbsInt GmbH 2013

Lecture 13. Real-Time Scheduling. Daniel Kästner AbsInt GmbH 2013 Lecture 3 Real-Time Scheduling Daniel Kästner AbsInt GmbH 203 Model-based Software Development 2 SCADE Suite Application Model in SCADE (data flow + SSM) System Model (tasks, interrupts, buses, ) SymTA/S

More information

NP-Hardness reductions

NP-Hardness reductions NP-Hardness reductions Definition: P is the class of problems that can be solved in polynomial time, that is n c for a constant c Roughly, if a problem is in P then it's easy, and if it's not in P then

More information

COMP9334: Capacity Planning of Computer Systems and Networks

COMP9334: Capacity Planning of Computer Systems and Networks COMP9334: Capacity Planning of Computer Systems and Networks Week 2: Operational analysis Lecturer: Prof. Sanjay Jha NETWORKS RESEARCH GROUP, CSE, UNSW Operational analysis Operational: Collect performance

More information

Optimality Results for Multiprocessor Real-Time Locking

Optimality Results for Multiprocessor Real-Time Locking Optimality Results for Multiprocessor Real-Time Locking Björn B. Brandenburg and James H. Anderson Department of Computer Science, University of North Carolina at Chapel Hill Abstract When locking protocols

More information

Chuck Cartledge, PhD. 21 January 2018

Chuck Cartledge, PhD. 21 January 2018 Big Data: Data Analysis Boot Camp Non-SQL and R Chuck Cartledge, PhD 21 January 2018 1/19 Table of contents (1 of 1) 1 Intro. 2 Non-SQL DBMS Classic Non-SQL databases 3 Hands-on Airport connections as

More information

Distributed Systems Principles and Paradigms. Chapter 06: Synchronization

Distributed Systems Principles and Paradigms. Chapter 06: Synchronization Distributed Systems Principles and Paradigms Maarten van Steen VU Amsterdam, Dept. Computer Science Room R4.20, steen@cs.vu.nl Chapter 06: Synchronization Version: November 16, 2009 2 / 39 Contents Chapter

More information

Distributed Systems Principles and Paradigms

Distributed Systems Principles and Paradigms Distributed Systems Principles and Paradigms Chapter 6 (version April 7, 28) Maarten van Steen Vrije Universiteit Amsterdam, Faculty of Science Dept. Mathematics and Computer Science Room R4.2. Tel: (2)

More information

Blocking Synchronization: Streams Vijay Saraswat (Dec 10, 2012)

Blocking Synchronization: Streams Vijay Saraswat (Dec 10, 2012) 1 Streams Blocking Synchronization: Streams Vijay Saraswat (Dec 10, 2012) Streams provide a very simple abstraction for determinate parallel computation. The intuition for streams is already present in

More information

State Minimization for Concurrent System Analysis Based on State Space Exploration

State Minimization for Concurrent System Analysis Based on State Space Exploration University of Pennsylvania ScholarlyCommons Technical Reports (CIS) Department of Computer & Information Science May 1994 State Minimization for Concurrent System Analysis Based on State Space Exploration

More information

RESEARCH ON THE DISTRIBUTED PARALLEL SPATIAL INDEXING SCHEMA BASED ON R-TREE

RESEARCH ON THE DISTRIBUTED PARALLEL SPATIAL INDEXING SCHEMA BASED ON R-TREE RESEARCH ON THE DISTRIBUTED PARALLEL SPATIAL INDEXING SCHEMA BASED ON R-TREE Yuan-chun Zhao a, b, Cheng-ming Li b a. Shandong University of Science and Technology, Qingdao 266510 b. Chinese Academy of

More information

Introduction to ArcGIS Server Development

Introduction to ArcGIS Server Development Introduction to ArcGIS Server Development Kevin Deege,, Rob Burke, Kelly Hutchins, and Sathya Prasad ESRI Developer Summit 2008 1 Schedule Introduction to ArcGIS Server Rob and Kevin Questions Break 2:15

More information

CIS 4930/6930: Principles of Cyber-Physical Systems

CIS 4930/6930: Principles of Cyber-Physical Systems CIS 4930/6930: Principles of Cyber-Physical Systems Chapter 11 Scheduling Hao Zheng Department of Computer Science and Engineering University of South Florida H. Zheng (CSE USF) CIS 4930/6930: Principles

More information

Scalability is Quantifiable

Scalability is Quantifiable Scalability is Quantifiable Universal Scalability Law Baron Schwartz - November 2017 Logistics & Stuff Slides will be posted :) Ask questions anytime! Founder of VividCortex Wrote High Performance MySQL

More information

Abstractions and Decision Procedures for Effective Software Model Checking

Abstractions and Decision Procedures for Effective Software Model Checking Abstractions and Decision Procedures for Effective Software Model Checking Prof. Natasha Sharygina The University of Lugano, Carnegie Mellon University Microsoft Summer School, Moscow, July 2011 Lecture

More information

Homework. Turing Machines. Announcements. Plan for today. Now our picture looks like. Languages

Homework. Turing Machines. Announcements. Plan for today. Now our picture looks like. Languages Homework s TM Variants and the Universal TM Homework #6 returned Homework #7 due today Homework #8 (the LAST homework!) Page 262 -- Exercise 10 (build with JFLAP) Page 270 -- Exercise 2 Page 282 -- Exercise

More information

Loop Parallelization Techniques and dependence analysis

Loop Parallelization Techniques and dependence analysis Loop Parallelization Techniques and dependence analysis Data-Dependence Analysis Dependence-Removing Techniques Parallelizing Transformations Performance-enchancing Techniques 1 When can we run code in

More information

The Weakest Failure Detector for Wait-Free Dining under Eventual Weak Exclusion

The Weakest Failure Detector for Wait-Free Dining under Eventual Weak Exclusion The Weakest Failure Detector for Wait-Free Dining under Eventual Weak Exclusion Srikanth Sastry Computer Science and Engr Texas A&M University College Station, TX, USA sastry@cse.tamu.edu Scott M. Pike

More information

CS5412: REPLICATION, CONSISTENCY AND CLOCKS

CS5412: REPLICATION, CONSISTENCY AND CLOCKS 1 CS5412: REPLICATION, CONSISTENCY AND CLOCKS Lecture X Ken Birman Recall that clouds have tiers 2 Up to now our focus has been on client systems and the network, and the way that the cloud has reshaped

More information

public void run ( ) { i f ( this. id == 0) System. out. p r i n t ( 3 ) ; bro. j o i n ( ) ; else System. out. p r i n t ( 2 ) ;

public void run ( ) { i f ( this. id == 0) System. out. p r i n t ( 3 ) ; bro. j o i n ( ) ; else System. out. p r i n t ( 2 ) ; 1 Unusual programs 1. Consider the following Java program : public c l a s s Thread2 extends Thread { public int id ; public Thread2 bro ; public Thread2 ( int id, Thread2 bro ) { this. id = id ; this.

More information

CS 550 Operating Systems Spring CPU scheduling I

CS 550 Operating Systems Spring CPU scheduling I 1 CS 550 Operating Systems Spring 2018 CPU scheduling I Process Lifecycle Ready Process is ready to execute, but not yet executing Its waiting in the scheduling queue for the CPU scheduler to pick it up.

More information

An Improved Schedulability Test for Uniprocessor. Periodic Task Systems

An Improved Schedulability Test for Uniprocessor. Periodic Task Systems An Improved Schedulability Test for Uniprocessor Periodic Task Systems UmaMaheswari C. Devi Department of Computer Science, University of North Carolina, Chapel Hill, NC 27599-375 December 2002 Abstract

More information

CS 347 Parallel and Distributed Data Processing

CS 347 Parallel and Distributed Data Processing CS 347 Parallel and Distributed Data Processing Spring 2016 Notes 2: Distributed Database Design Logistics Gradiance No action items for now Detailed instructions coming shortly First quiz to be released

More information

CS-206 Concurrency. Lecture 13. Wrap Up. Spring 2015 Prof. Babak Falsafi parsa.epfl.ch/courses/cs206/

CS-206 Concurrency. Lecture 13. Wrap Up. Spring 2015 Prof. Babak Falsafi parsa.epfl.ch/courses/cs206/ CS-206 Concurrency Lecture 13 Wrap Up Spring 2015 Prof. Babak Falsafi parsa.epfl.ch/courses/cs206/ Created by Nooshin Mirzadeh, Georgios Psaropoulos and Babak Falsafi EPFL Copyright 2015 EPFL CS-206 Spring

More information

Performing Map Cartography. using Esri Production Mapping

Performing Map Cartography. using Esri Production Mapping AGENDA Performing Map Cartography Presentation Title using Esri Production Mapping Name of Speaker Company Name Kannan Jayaraman Agenda Introduction What s New in ArcGIS 10.1 ESRI Production Mapping Mapping

More information

Analyzing Contention and Backoff in Asynchronous Shared Memory

Analyzing Contention and Backoff in Asynchronous Shared Memory Analyzing Contention and Backoff in Asynchronous Shared Memory ABSTRACT Naama Ben-David Carnegie Mellon University nbendavi@cs.cmu.edu Randomized backoff protocols have long been used to reduce contention

More information

1 Lamport s Bakery Algorithm

1 Lamport s Bakery Algorithm Com S 6 Spring Semester 2009 Algorithms for Multiprocessor Synchronization Lecture 3: Tuesday, 27th January 2009 Instructor: Soma Chaudhuri Scribe: Neeraj Khanolkar Lamport s Bakery Algorithm Algorithm

More information

Deadlock Ezio Bartocci Institute for Computer Engineering

Deadlock Ezio Bartocci Institute for Computer Engineering TECHNISCHE UNIVERSITÄT WIEN Fakultät für Informatik Cyber-Physical Systems Group Deadlock Ezio Bartocci Institute for Computer Engineering ezio.bartocci@tuwien.ac.at Deadlock Permanent blocking of a set

More information

Nuclear Medicine Physics Course Laboratory Number 3: Dose Calibrator Quality Control

Nuclear Medicine Physics Course Laboratory Number 3: Dose Calibrator Quality Control Nuclear Medicine Physics Course Laboratory Number 3: Dose Calibrator Quality Control Purpose 1. To understand quality control tests for accuracy, linearity, and daily constancy that are necessary in the

More information

6.897: Selected Topics in Cryptography Lectures 7 and 8. Lecturer: Ran Canetti

6.897: Selected Topics in Cryptography Lectures 7 and 8. Lecturer: Ran Canetti 6.897: Selected Topics in Cryptography Lectures 7 and 8 Lecturer: Ran Canetti Highlights of past lectures Presented a basic framework for analyzing the security of protocols for multi-party function evaluation.

More information

Allocate-On-Use Space Complexity of Shared-Memory Algorithms

Allocate-On-Use Space Complexity of Shared-Memory Algorithms 1 2 3 4 5 6 7 8 9 10 Allocate-On-Use Space Complexity of Shared-Memory Algorithms James Aspnes 1 Yale University Department of Computer Science Bernhard Haeupler Carnegie Mellon School of Computer Science

More information

NoPain Meeting. Jan 28, Department of Computer Science Brandenburg University of Technology Cottbus.

NoPain Meeting. Jan 28, Department of Computer Science Brandenburg University of Technology Cottbus. opain Meeting Monia Heiner Christian Rohr Department of Computer Science Brandenburg University of Technology Cottbus http://www-dssz.informati.tu-cottbus.de Jan, 1 Wor Pacages Coloured hybrid Petri nets

More information

An Optimal k-exclusion Real-Time Locking Protocol Motivated by Multi-GPU Systems

An Optimal k-exclusion Real-Time Locking Protocol Motivated by Multi-GPU Systems An Optimal k-exclusion Real-Time Locking Protocol Motivated by Multi-GPU Systems Glenn A. Elliott and James H. Anderson Department of Computer Science, University of North Carolina at Chapel Hill Abstract

More information

Design Patterns and Refactoring

Design Patterns and Refactoring Singleton Oliver Haase HTWG Konstanz 1 / 19 Description I Classification: object based creational pattern Puropse: ensure that a class can be instantiated exactly once provide global access point to single

More information

Quick Start Guide New Mountain Visit our Website to Register Your Copy (weatherview32.com)

Quick Start Guide New Mountain Visit our Website to Register Your Copy (weatherview32.com) Quick Start Guide New Mountain Visit our Website to Register Your Copy (weatherview32.com) Page 1 For the best results follow all of the instructions on the following pages to quickly access real-time

More information

Schedulability Analysis for the Abort-and-Restart Model

Schedulability Analysis for the Abort-and-Restart Model Schedulability Analysis for the Abort-and-Restart Model Hing Choi Wong Doctor of Philosophy University of York Computer Science December 2014 Abstract In real-time systems, a schedulable task-set guarantees

More information

B- TREE. Michael Tsai 2017/06/06

B- TREE. Michael Tsai 2017/06/06 B- TREE Michael Tsai 2017/06/06 2 B- Tree Overview Balanced search tree Very large branching factor Height = O(log n), but much less than that of RB tree Usage: Large amount of data to be stored - - Partially

More information