Distributed Transactional Memory Presented by Gala Yadgar.

Slides:



Advertisements
Similar presentations
Chapter 11 Trees Graphs III (Trees, MSTs) Reading: Epp Chp 11.5, 11.6.
Advertisements

Chapter 5: Tree Constructions
I/O Management and Disk Scheduling
Single Source Shortest Paths
Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke1 Concurrency Control Chapter 17 Sections
Chapter 15 Basic Asynchronous Network Algorithms
Comp 122, Spring 2004 Binary Search Trees. btrees - 2 Comp 122, Spring 2004 Binary Trees  Recursive definition 1.An empty tree is a binary tree 2.A node.
Approximation, Chance and Networks Lecture Notes BISS 2005, Bertinoro March Alessandro Panconesi University La Sapienza of Rome.
Lookahead. Outline Null message algorithm: The Time Creep Problem Lookahead –What is it and why is it important? –Writing simulations to maximize lookahead.
Graphs III (Trees, MSTs) (Chp 11.5, 11.6)
Distributed Transactional Memory for General Networks Gokarna Sharma Costas Busch Srivathsan Srinivasagopalan Louisiana State University May 24, 2012.
1 K-clustering in Wireless Ad Hoc Networks Fernandess and Malkhi Hebrew University of Jerusalem Presented by: Ashish Deopura.
Peer-to-Peer Distributed Search. Peer-to-Peer Networks A pure peer-to-peer network is a collection of nodes or peers that: 1.Are autonomous: participants.
Combinatorial Algorithms
November 5, Algorithms and Data Structures Lecture VIII Simonas Šaltenis Nykredit Center for Database Research Aalborg University
1 Maximal Independent Set. 2 Independent Set (IS): In a graph, any set of nodes that are not adjacent.
CPSC 689: Discrete Algorithms for Mobile and Wireless Systems Spring 2009 Prof. Jennifer Welch.
1 Discrete Structures & Algorithms Graphs and Trees: II EECE 320.
Routing, Anycast, and Multicast for Mesh and Sensor Networks Roland Flury Roger Wattenhofer RAM Distributed Computing Group.
Distributed Systems 2006 Styles of Client/Server Computing.
Branch and Bound Similar to backtracking in generating a search tree and looking for one or more solutions Different in that the “objective” is constrained.
LSRP: Local Stabilization in Shortest Path Routing Hongwei Zhang and Anish Arora Presented by Aviv Zohar.
Scalable Application Layer Multicast Suman Banerjee Bobby Bhattacharjee Christopher Kommareddy ACM SIGCOMM Computer Communication Review, Proceedings of.
DL Compression – Beeri/Feitelson1 Compression דחיסה Introduction Information theory Text compression IL compression.
Department of Computer Eng. & IT Amirkabir University of Technology (Tehran Polytechnic) Data Structures Lecturer: Abbas Sarraf Search.
1 A Distributed Delay-Constrained Dynamic Multicast Routing Algorithm Quan Sun and Horst Langendorfer Telecommunication Systems Journal, vol.11, p.47~58,
Dept. of Computer Science Distributed Computing Group Asymptotically Optimal Mobile Ad-Hoc Routing Fabian Kuhn Roger Wattenhofer Aaron Zollinger.
1 Scalable Transactional Memory Scheduling Gokarna Sharma (A joint work with Costas Busch) Louisiana State University.
An Efficient Location Service for Mobile Ad Hoc Networks Roland Flury Roger Wattenhofer Distributed Computing Group MLS.
Doubling Dimension in Real-World Graphs Melitta Lorraine Geistdoerfer Andersen.
Binary Trees Chapter 6.
Distributed Constraint Optimization Michal Jakob Agent Technology Center, Dept. of Computer Science and Engineering, FEE, Czech Technical University A4M33MAS.
1 By: MOSES CHARIKAR, CHANDRA CHEKURI, TOMAS FEDER, AND RAJEEV MOTWANI Presented By: Sarah Hegab.
Chapter 6 Binary Trees. 6.1 Trees, Binary Trees, and Binary Search Trees Linked lists usually are more flexible than arrays, but it is difficult to use.
Computer Algorithms Submitted by: Rishi Jethwa Suvarna Angal.
Locating Mobile Agents in Distributed Computing Environment.
Search Trees. Binary Search Tree (§10.1) A binary search tree is a binary tree storing keys (or key-element pairs) at its internal nodes and satisfying.
Outline Binary Trees Binary Search Tree Treaps. Binary Trees The empty set (null) is a binary tree A single node is a binary tree A node has a left child.
Analysis of Algorithms CS 477/677 Instructor: Monica Nicolescu Lecture 9.
Databases Illuminated
On the Performance of Window-Based Contention Managers for Transactional Memory Gokarna Sharma and Costas Busch Louisiana State University.
Lecture 3: Uninformed Search
Commit Algorithms Hamid Al-Hamadi CS 5204 November 17, 2009.
Review 1 Queue Operations on Queues A Dequeue Operation An Enqueue Operation Array Implementation Link list Implementation Examples.
Super computers Parallel Processing
Adversarial Search 2 (Game Playing)
Distributed Algorithms for Dynamic Coverage in Sensor Networks Lan Lin and Hyunyoung Lee Department of Computer Science University of Denver.
NOTE: To change the image on this slide, select the picture and delete it. Then click the Pictures icon in the placeholder to insert your own image. Fast.
1 Distributed Vertex Coloring. 2 Vertex Coloring: each vertex is assigned a color.
1 Concurrent Counting is harder than Queuing Costas Busch Rensselaer Polytechnic Intitute Srikanta Tirthapura Iowa State University.
CS3771 Today: Distributed Coordination  Previous class: Distributed File Systems Issues: Naming Strategies: Absolute Names, Mount Points (logical connection.
Introduction Wireless Ad-Hoc Network  Set of transceivers communicating by radio.
File Organization and Processing Week 3
Heaps (8.3) CSE 2011 Winter May 2018.
Chapter 5 : Trees.
O(log n / log log n) RMRs Randomized Mutual Exclusion
CS 332: Algorithms Red-Black Trees David Luebke /20/2018.
Red Black Trees
O(log n / log log n) RMRs Randomized Mutual Exclusion
Binary Tree and General Tree
Chapter 22 : Binary Trees, AVL Trees, and Priority Queues
Chapter 2: Basic Data Structures
Map interface Empty() - return true if the map is empty; else return false Size() - return the number of elements in the map Find(key) - if there is an.
Graphs Chapter 11 Objectives Upon completion you will be able to:
Heaps 12/4/2018 5:27 AM Heaps /4/2018 5:27 AM Heaps.
Ch. 8 Priority Queues And Heaps
Introduction Wireless Ad-Hoc Network
Algorithms and Data Structures Lecture VIII
Software Transactional Memory Should Not be Obstruction-Free
Algorithms (2IL15) – Lecture 7
Presentation transcript:

Distributed Transactional Memory Presented by Gala Yadgar

2 Model A network of nodes Transactions are immobile Objects move from node to node

3 Model Cache coherence protocol Locate the current copy Move and invalidate Metric Location aware A C B D

4 Outline Ballistic protocol Hierarchical clustering Operations Requirements Finite response time Performance Publish Move Additional results Summary

5 Motivation The contention manager guarantees atomicity Should be obstruction free Performance goals Makespan Competitive ratio Makespan of optimal

6 Transactional memory proxy Local request: Local object – return copy Remote object – locate with Ballistic Remote request: Object not in use – invalidate copies and send Object in use – abort or postpone response Commit: No invalidations – commit Invalidations – abort

7 Outline Ballistic protocol Hierarchical clustering Operations Requirements Finite response time Performance Publish Move Additional results Summary

8 Hierarchical clustering L=3

9 Hierarchical clustering L=3 Level 0 Physical nodes are leaf nodes x and y are connected iff d(x,y) < 2 1 Leader 0 is the maximal independent set

10 Hierarchical clustering L=3 Level l Only nodes from leader l-1 x and y are connected iff d(x,y) < 2 l+1 Leader l is the maximal independent set Level L Root L ≤ log 2 Diam + 1

11 Hierarchical clustering L=3 Level l, node x Lookup parent set Level l+1 nodes within distance 10*2 l+1 from x Home parent Closest lookup parent Move parent set Level l+1 nodes within distance 4*2 l+1 from x x

12 Outline Ballistic protocol Hierarchical clustering Operations Requirements Finite response time Performance Publish Move Additional results Summary

13 Publish() L=3 Object at node p Create a single directed path from root to p Home i (p).link = Home i-1 (p) * We deal with a single object

14 lookup() L=3 Request at node q Up phase Home i-1 (q) initiates a search for a non-null link at lookupProbe i (q) Down phase Follow links to a leaf Obtain copy or wait with leaf

15 move() L=3 Request at node q Up phase Home i-1 (q) initiates a search for a non-null link at moveProbe i (q) Home i (q).link = Home i-1 (q) Redirect if found Down phase Follow links to a leaf Erase links Wait in queue

16 Outline Ballistic protocol Hierarchical clustering Operations Requirements Finite response time Performance Publish Move Additional results Summary

17 Overtaking L=3 Object at node p a - 1 st request b - 2 nd request b enqueued first. a b

18 Outline Ballistic protocol Hierarchical clustering Operations Requirements Finite response time Performance Publish Move Additional results Summary

19 Finite write response time Every move request is satisfied within time n * T E + n * T O from when it is generated T E – maximum enqueue delay T O – maximum time to reach a successor n – number of nodes Equivalent – finite read response time a b

20 Proof By time at most t + n * T E, either 1. All successor links between r and its n predecessors r 1, r 2, …, r n have been established 2. There is k≤n-1, r k is p, the publish request. 1. At least two requests r i, r j come from the same node They are different (Lemma 1) One was satisfied The object reached a predecessor

21 Proof Let x be the location of the object at time t + n * T E r is at most n steps away from x by taking the successor links r will have the object by time at most t + n * T E + n * T O

22 Bounded overtaking (corollary) (Every move request is satisfied within time n * T E + n * T O from when it is generated) Request r is generated at time t All requests generated after time t + n * T E will be ordered after r All requests generated prior to time t - n * T E will be ordered before r

23 Lemma 1 There exists no set of finite number of requests R={r 1, r 2, …, r f } whose successor links form a cycle r’s arrow: a downward link added by r’s visit Outside arrows: established by requests outside R P C

24 Invariants 1. The root always has an arrow 2. Requests see an arrow at the peak level before the down phase 3. During the down phase, requests see an arrow until they reach a leaf 4. r’s arrow at level i points to C=home i-1 (r)

25 Invariants 5. r adds and arrow P  C at time t At time t –, r added an arrow to a grandchild C  At time t + that arrow will be erased by r’ r’ reached C from P r’ erased r’s arrow P  C During [t -,t + ], C always has an arrow May be redirected from one grandchild to another P C

26 Proof H: the highest peak level reached by requests in R The first request to reach H sees an outside arrow We show: in any level l<H some request from R sees an outside arrow That request is queued behind an outside request

27 Proof (by induction ) Base: at level H Step: At time t, r in R sees an outside arrow at level k in node P. The arrow was established by x not in R. P  C, C is x’s home directory x also established C  at level k-1, at time t – At time t +, r reaches C. Either 1. Another request from R sees C  during [t -,t + ] 2. r sees C  at time t + P C

28 Outline Ballistic protocol Hierarchical clustering Operations Requirements Finite response time Performance Publish Move Additional results Summary

29 Overtaking revisited L=3 Object at node p a - 1 st request b - 2 nd request b enqueued first. What if a’s priority is higher? a b

30 Intuitively… Optimal schedule Minimum cost Hamiltonian path Visit each node once Greedy schedule worst case Tx aborted by all higher priority Txs Each abort requires a move() Node with timestamp k visited k times

31 Performance Work An operation’s communication overhead Distance The cost of communicating directly from the requesting node to its destination Stretch work/distance Executions can be sequential or concurrent

32 Performance Publish cost The publish operation has work O(Diam) Move cost If an object has moved a combined distance d since its initial publication, the amortized move stretch is O(min{log 2 d,L})

33 Outline Ballistic protocol Hierarchical clustering Operations Requirements Finite response time Performance Publish Move Additional results Summary

34 Performance Publish cost The publish operation has work O(Diam)

35 1. Bounded link property The metric distance between a level-l child and its level-(l+1) parent is less than or equal to c b * 2 l, for some constant c b. x and y are connected iff d(x,y) < 2 l+1

36 2. Constant expansion property Any node has no more than a constant number of lookup parents and lookup children (c e ) * This property requires a constant doubling metric L=3

37 Constant doubling dimension Metric: distances between all pairs, non-negative, triangle inequality Ball B u (r) = { v | d(u,v) ≤ r } 2 α balls of radius r/2 cover ball of radius r Doubling dimension: α is constant Based on “Ad Hoc Sensor Networks” by Roger Wattenhofer

38 3. Lookup property For any two leaves p,q p l : any of p’s level-l ancestors by following move parents only. If p l is not in lookupProbe l (q)  d(p,q) ≥ c l * 2 l, for some constant c l 0 L p q plpl plpl … c l * 2 l

39 4. Move property For any two leaves p,q p l : p’s level-l home directory If p l is not in moveProbe l (q)  d(p,q) ≥ c m * 2 l, for some constant c m 0 L p q plpl … c m * 2 l

40 Lemma 3 There exists a constant c w such that for any operation that peaks at level l, the work it performs is at most c w * 2 l Proof Bounded link  link cost c b * 2 l Constant expansion  number of steps in each level

41 Publish performance The publish operation has work O(Diam) Publish operations peak at level L The work is ≤ c w * 2 L (Lemma 3) L ≤ log 2 Diam + 1

42 Outline Ballistic protocol Hierarchical clustering Operations Requirements Finite response time Performance Publish Move Additional results Summary

43 Performance Move cost If an object has moved a combined distance d since its initial publication, the amortized move stretch is O(min{log 2 d,L})

44 Lemma 4 q move request sequential execution Discovers a non-null link at node P at level l p move/publish request last to visit P d(p,q) ≥ c m * 2 l-1 0 L p q P … c m * 2 l-1

45 Proof The non null link at P points to home l-1 (p) home l-1 (p).link is non null at least until q removes its link (Invariant 5) It was there during q’s up phase q did not visit home l-1 (p) going up level l-1 Move property:d(p,q) ≥ c m * 2 l-1 0 L p q P … home l-1(p) c m * 2 l-1

46 Lemma 5 Distance of a sequential execution Sum of distances for all move operations In a sequential execution with distance d, the maximum level reached by any move request does not exceed min(log 2 d+c,L) c is a constant d log 2 d

47 Proof q 0 - the initial publish request l – highest level reached by a move request q – the request that peaked at level l (first) l ≤ L q saw a non null link at level l established by q 0 d(q,q 0 ) ≥ c m * 2 l-1 (Lemma 4) d ≥ d(q,q 0 ) l ≤ Log 2 (d/c m )+1 q0q0 q d l

48 Move performance Lemma 6 For any sequential execution α work(α) ≤ (c w /c m ) * l(α) * distance(α) l(α) – the maximum level reached by a move request of execution α By Lemma 5 distance(α) = d  l(α) ≤ min(log 2 d+c,L) The amortized move stretch is O(min{log 2 d,L}) No proof here…

49 Outline Ballistic protocol Hierarchical clustering Operations Requirements Finite response time Performance Publish Move Additional results Summary

50 Additional results Move cost Amortized move stretch is O(min{log 2 d,L}) for concurrent executions as well Idea “Lock” critical section in each level Prevent neighbors from “stealing” links

51 Additional results Lookup cost The stretch for a lookup operation is constant Idea An operation peaks at level h The work is at most c w * 2 h (Lemma 3) d(p,q) ≥ c l * 2 h (lookup property) Redefine distance with overlapping move requests

52 Additional results Multiple objects Require multiple directories Storage and request handling load on each node is O(log Diam). Idea Hash each node to multiple parallel directory nodes

53 Outline Ballistic protocol Hierarchical clustering Operations Requirements Finite response time Performance Publish Move Additional results Summary

54 Summary Distributed transactional memory Cache coherence protocol Hierarchical clustering: L ≤ log 2 Diam + 1 Results Finite write response time: n * T E + n * T O Publish cost: O(Diam) Move cost: O(min{log 2 d,L}) Constant lookup cost Multiple objects with O(log Diam) load

55 References Maurice Herlihy, Ye Sun. Distributed transactional memory for metric-space networks. Distributed Computing 20(3): (2007). Ye Sun. The Ballistic Protocol: Location-Aware Distributed Cache Coherence in Metric-Space Networks. Doctoral Thesis, Brown University Bo Zhang, Binoy Ravindran. Location-Aware Cache-Coherence Protocols for Distributed Transactional Contention Management in Metric-Space Networks