Boost logo

Boost :

From: John Max Skaller (skaller_at_[hidden])
Date: 2001-08-07 12:42:48

Beman Dawes wrote:
> At 06:07 PM 8/5/2001, John Max Skaller wrote:
> >Question: does anyone share stack data between threads?
> >
> >Reason for asking:
> >
> > 1) Bemans model tries to ban this
> > 2) I objected
> >
> My original formulation was confusing because it didn't clearly distinguish
> between stack data accessed directly by within its thread (not shared) and
> stack data access from another thread via pointer or reference (shared).

> >but it occurs to me that on a multi-processor, the constraint
> >would allow CPU local memory to be used for the stack, which
> >could be a significant optimisation.
> Since that would disallow inter-thread pointers or references to stack
> objects, I don't think it would allow a conforming thread implementation.

        According to your (reformulated) rules.
The question is: is the local (unsharable) stack a viable
and if so, can we ban sharing stack data to allow that implementation
without impacting programmers?

        Shared memory is expensive, local memory is cheap.
If threads can run with the stack on 'on board' memory which is on a
high speed per CPU bus from main memory, they might run considerably
faster: such memory can be cached without being flushed, since only
one CPU can access it.

        Sounds like a question for embedded programming people.

John (Max) Skaller, mailto:skaller_at_[hidden] 
10/1 Toxteth Rd Glebe NSW 2037 Australia voice: 61-2-9660-0850
New generation programming language Felix
Literate Programming tool Interscript

Boost list run by bdawes at, gregod at, cpdaniel at, john at