Re: Question about inter-thread stack references

George Neuner <gneuner2@comcast.net>
Sun, 18 Jan 2015 01:58:20 -0500

          From comp.compilers

Related articles
Question about inter-thread stack references ivan@ootbcomp.com (Ivan Godard) (2015-01-15)
Re: Question about inter-thread stack references seimarao@gmail.com (Seima Rao) (2015-01-16)
Re: Question about inter-thread stack references lkrupp@nospam.pssw.com.invalid (Louis Krupp) (2015-01-16)
Re: Question about inter-thread stack references gah@ugcs.caltech.edu (glen herrmannsfeldt) (2015-01-17)
Re: Question about inter-thread stack references gneuner2@comcast.net (George Neuner) (2015-01-18)
Re: Question about inter-thread stack references monnier@iro.umontreal.ca (Stefan Monnier) (2015-01-18)
Re: Question about inter-thread stack references kaz@kylheku.com (Kaz Kylheku) (2015-01-18)
Re: Question about inter-thread stack references ivan@ootbcomp.com (Ivan Godard) (2015-01-18)
Re: Question about inter-thread stack references gah@ugcs.caltech.edu (glen herrmannsfeldt) (2015-01-18)
Re: Question about inter-thread stack references gah@ugcs.caltech.edu (glen herrmannsfeldt) (2015-01-18)
Re: Question about inter-thread stack references jgk@panix.com (2015-01-25)
[2 later articles]
| List of all articles for this month |

From: George Neuner <gneuner2@comcast.net>
Newsgroups: comp.compilers
Date: Sun, 18 Jan 2015 01:58:20 -0500
Organization: A noiseless patient Spider
References: 15-01-015
Keywords: architecture, parallel
Posted-Date: 18 Jan 2015 14:07:36 EST

Hi Ivan,


On Thu, 15 Jan 2015 23:54:57 -0800, Ivan Godard <ivan@ootbcomp.com>
wrote:


>If a process has two or more threads running in it, what are the rules
>regarding one thread referencing memory in a different thread's stack?


No rules per se, but it isn't even feasible unless the lifetimes of
the references obey strict stack discipline wrt to the lifetime of the
target. You can find that sort of structure with coroutines and with
map-reduce style parent-child thread relationships - but not in
general.


However, I don't see any compelling reason to permit it. The stack is
nothing more than a compiler managed mark-release heap: it's only real
benefit to the programmer is no-brainer deallocation. Anything that
might usefully be done using stack sharing can be done almost as
easily - and much more safely - using an explicit mark-release heap or
stacked heaps (regions, per Tofte and others).


>Ivan
George


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.