home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.parallel
- Path: sparky!uunet!cs.utexas.edu!zaphod.mps.ohio-state.edu!swrinde!gatech!hubcap!fpst
- From: kh <kh@dcs.gla.ac.uk>
- Subject: Re: (comp.lang.functional) tree of frames
- Message-ID: <1992Dec31.140836.3548@hubcap.clemson.edu>
- Apparently-To: hypercube@hubcap.clemson.edu
- Keywords: tree of frames ...
- Sender: fpst@hubcap.clemson.edu (Steve Stevenson)
- Organization: Computing Sci, Glasgow Univ, Scotland
- References: <1992Dec23.140907.21427@hubcap.clemson.edu> <1992Dec28.182105.9329@crl.dec.com>
- Date: Wed, 30 Dec 92 21:42:18 GMT
- Approved: parallel@hubcap.clemson.edu
- Lines: 54
-
- In article <1992Dec28.182105.9329@crl.dec.com> nikhil@crl.dec.com (R.S. Nikhil) writes:
-
- As Nikhil's aware, in our parallel functional implementation we use a
- segmented stack similar to the cactus stack model.
-
- >- In the cactus stack model, the following actions can be expensive:
- > a) allocating a new stack (e.g., large object, load balancing issues)
-
- For our segmented scheme, the actual allocation cost is usually no
- greater than for a single small object (unless garbage collection is
- invoked). I suspect that's true for most allocators currently used in
- functional/dataflow languages. If dead stack segments can be reused,
- then the cost can be reduced further.
-
- > b) handling the exception when (if) a stack overflows and needs to be enlarged
-
- This can certainly be significant if it occurs, but our measurements
- suggest that stack overflow is quite infrequent for the applications
- we run, even with fairly small [4K] stack segments (this can depend
- crucially on granularity, of course: large grained tasks are likely to
- require larger stacks). Against this, you need to count the cost of
- extra GCs for allocated, but not yet used, slots in stack frames.
-
- > c) migrating an entire stack (for load balancing)
- > Some of these can be easier to manage at the granularity of
- > individual frames.
-
- I've been pondering this for a while, but without coming to a definite
- conclusion. Surely, if you migrate a task then you will eventually
- migrate most of the stack anyway (as each basic block returns to its
- caller, so the parent frame must be migrated, unless the child task is
- returned to the parent processor). The difference is then a tradeoff
- between latency and communication time (with "cactus stacks" a few
- long packets transmit the entire stack, whereas many short packets may
- be necessary for the distributed frame model). Of course, if
- migration is frequent, then the frame model is probably better, but
- otherwise the reduction in communication cost is likely to favour the
- stack model, isn't it (assuming that communication cost is cheaper
- per-byte if larger packets are used)?
-
- > So, it can only be answered by experience and, on
- >that dimension, I think it is still too early to tell.
-
- Is there any work which compares the two approaches within the same
- compilation environment (for functional/dataflow languages)? The
- results could be interesting...
-
- Regards,
- Kevin
- --
- Dept. of Computing Science, Glasgow University. E-mail: kh@dcs.glasgow.ac.uk
-
- This Signature Intentionally segmentation fault
-
-