Tuple space parallel programming model

compliantprotectiveSoftware and s/w Development

Dec 1, 2013 (3 years and 8 months ago)

80 views

CS 5200

Distributed and Parallel Systems Programming

Fall 2002

Tuple space parallel programming model

The tuple
-
space model consists of a few simple operations. The model is independent of the language in which it is
implemented or the method of implementation. The primary operations are
in()

and

out()
. A language and

operating
system implementing these operations provides a practical method of writing and running parallel programs which
effectively realize most the goals for a true distributed operating system.

A tuple is a series of typed values. For example;

(“hello
”, 3.14, 21, x)

or

(0, 1)

The out() operation posts a tuple to a globally accessible memory called
tuple space.

For example,


float data[10];

out (“job1”, 5, data);

The in() operation retrieves a tuple. An important distinction between
in()

and

out
() and s
imple message passing is
that the
in()

operator
may specify actual or formal values

for tuple fields. Any matching tuple is thus retrieved. For
example;

int k; float array[10];

in (“job1”, ? k, ?array);

represents a request for any tuple matching this temp
late
--

the string “job1” followed by any integer, followed by
any float array of 10 cells. On return, the actual values of the matching tuple will have been copied into the formal
param
eters. If no matching tuple is available for an
in()

operation,
the c
alling process suspends until one is
available
.

An important feature of this model is that the processes doing
in()

and
out()

operations
are
completely uncoupled in
time and space. In other words, processes are written to be completely independent: No proc
ess needs to know the
name or process ID of another. No process needs to know when or where another process will be executed. No
process needs to care about where or when it will be executed. No process needs to know the state of any other
process.

Impleme
ntation issues

1.

How would the in() and out() operations determine the location of the tuple space manager?

2.

How would the out() operation in a process communicate with the tuple space?

3.

Where would the tuple space reside?

4.

How would the in() operation in a pro
cess communicate with the tuple space?

5.

How would the tuple
-
space manager know when an in() tuple operation was requesting communication and
where to return a reply?

6.

How would you force the in() operation to block if a tuple were not available, then unblock

and receive the
tuple when it was later posted?

7.

How would you store tuples in the tuple space?