Download presentation
Presentation is loading. Please wait.
1
CS 584 Lecture 16 n Assignment -- Due Friday n C* program n Paper reviews
2
Models of Parallelism n Message Passing (MPI, PVM) n Data parallelism (C*) n Global data-space (Linda)
3
Linda n Consists of several operations that work on a global data space (tuple space) n The operations have been added to several languages. n MIMD programming model n Interaction is through tuple space
4
Tuples n A tuple is an object consisting of: n a key n zero or more arguments n Example ("jim", 88, 1.5) n The key is used for matching
5
Tuple Space n Global data space n Collection of tuples n Tuples may be: n inserted (out) n read (rd and rdp) n deleted(in and inp) n evaluated(eval) n forks a new worker
6
Tuple Space
7
n Updating a tuple n delete - modify - insert n Duplicate key entries is allowed n Non-determinism n inp and rdp guarantee to locate a matching tuple iff a matching tuple must have been added and could not have been removed before the request
8
Example Programs n Database search n Master-Worker n Divide and Conquer
9
procedure manager count = 0 until EOF do read datum from file OUT("datum", datum) count++ enddo best = 0.0 for j = 1 to count IN("score", value) if (value > best) best = value endfor for j = 1 to numworkers OUT("datum", "stop") endfor end
10
procedure worker IN("datum", datum) until datum == "stop" value = compare(datum, target) OUT("score", value) IN("datum", datum) enddo end
11
Tuple Space n Perfect candidate for a database. n Simplifies parallel programming? n Performance? n Consider the implementation of the tuple space.
12
Tuple Space Implementation n Central n What advantages/disadvantages does this implementation present?
13
Tuple Space Implementation n Distributed n What advantages/disadvantages does this implementation present?
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.