Article View: fj.mail-lists.parallel
Article #337Re: PVM: thoughts on data-passing routines
From: Martin C. Rinard
Date: Wed, 12 Aug 1992 12:20
Date: Wed, 12 Aug 1992 12:20
40 lines
2461 bytes
2461 bytes
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
Technical Details
Message-ID:
<313320@nttlab.ntt.JP>Path:
arc1-ca.pugleaf.net!sparky!uunet!sun-barr!sh.wide!wnoc-tyo-news!etl.go.jp!gama!lab!nttlab!daemonShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!sun-barr!sh.wide!wnoc-tyo-news!etl.go.jp!gama!lab!nttlab!daemon From: martin@xenon.stanford.edu (Martin C. Rinard) Newsgroups: fj.mail-lists.parallel Subject: Re: PVM: thoughts on data-passing routines Message-ID: <313320@nttlab.ntt.JP> Date: 12 Aug 92 12:20:33 GMT Sender: daemon@nttlab.ntt.JP Distribution: fj Lines: 40 Approved: news@nttlab.ntt