home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.parallel
- Path: sparky!uunet!gatech!hubcap!fpst
- From: martin@xenon.stanford.edu (Martin C. Rinard)
- Subject: Re: PVM: thoughts on data-passing routines
- Message-ID: <1992Aug12.121940.6378@hubcap.clemson.edu>
- Apparently-To: comp-parallel@uunet.uu.net
- Sender: news@times.stanford.edu
- Organization: Computer Science Department, Stanford University.
- References: <1992Aug11.121234.28784@hubcap.clemson.edu>
- Date: Tue, 11 Aug 1992 19:13:26 GMT
- Approved: parallel@hubcap.clemson.edu
- Lines: 41
-
- jek@cs.duke.edu (James E. Kittock) writes:
-
- > While working on this, I have come to the conclusion that the C
- > interface to PVM has a serious "want", namely, a routine to
- > automagically put a structure and all of its contents, *including* the
- > contents of any arrays/structures/unions pointed to by members of that
- > structure.
-
- This is a standard problem in distributed systems. To recursively
- pass a data structure between machines, you in general have
- to pack recursively all the objects to which the first object points into a
- message, then unpack the objects on the other side and reconstruct
- the pointers. To pack an object given a pointer to that object,
- you need to know the type and size of the object. In general,
- it is impossible for a C program to get type and size information
- given only a pointer to an object. If you want to recursively pass
- data structures between machines, you need to augment either the
- pointers or the data structures to which they point with type and
- size information.
-
- Here at Stanford, we have developed a language called Jade that
- supports the concept of an object which consists of several
- allocation units. The Jade frontend generates routines that
- recursively pack and unpack such objects, reconstructing the
- pointers as necessary. When the Jade implementation determines that
- such an object needs to be passed from one machine to another,
- the sender calls the packing routines to put the data into a message,
- then sends the message off to the receiver. The receiver then
- invokes the routines that unpack the object and reconstruct the
- pointers. To support this functionality, the Jade memory allocators
- augment allocated data with a type tag and a size tag. The packing
- routines use these tags to determine how to pack and unpack the objects.
-
- So, such a scheme (in general) requires programming language support
- beyond that which C provides. But, you can put the type and size tags
- in by hand, and generate your own routines to pack and unpack the
- data structures.
-
-
- Martin
-
-