Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.compilers > #1472
| From | Ivan Godard <ivan@ootbcomp.com> |
|---|---|
| Newsgroups | comp.compilers |
| Subject | Question about inter-thread stack references |
| Date | 2015-01-15 23:54 -0800 |
| Organization | A noiseless patient Spider |
| Message-ID | <15-01-015@comp.compilers> (permalink) |
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? In the usual way that paging hardware works both stacks can be made visible to both threads, but interstack visibility could also be prevented (assuming that stacks occupied whole pages). However, if a stack object can be referenced by a concurrent thread running in another core then it becomes impossible to optimize and move stack objects into registers because they might be referenced at any time. Even if the program were required to declare such data volatile there would still be locking needed. I vaguely (so vague that I can't find citations) remember that on some, possibly legacy, hardware it was physically impossible to do inter-thread stack accesses; stacks were strictly per-thread and private. I also vaguely recall that some languages (or thread packages) banned the practice even if it were physically possible. Is anyone aware of language/thread package/hardware rules about required semantics for such usage? Is it explicitly permitted, explicitly banned, stated to be implementation defined, stated to be undefined, or simply not mentioned? Thanks for your help. Ivan
Back to comp.compilers | Previous | Next — Next in thread | Find similar | Unroll thread
Question about inter-thread stack references Ivan Godard <ivan@ootbcomp.com> - 2015-01-15 23:54 -0800
Re: Question about inter-thread stack references Louis Krupp <lkrupp@nospam.pssw.com.invalid> - 2015-01-16 22:28 -0700
Re: Question about inter-thread stack references glen herrmannsfeldt <gah@ugcs.caltech.edu> - 2015-01-17 18:46 +0000
Re: Question about inter-thread stack references George Neuner <gneuner2@comcast.net> - 2015-01-18 01:58 -0500
Re: Question about inter-thread stack references glen herrmannsfeldt <gah@ugcs.caltech.edu> - 2015-01-18 21:47 +0000
Re: Question about inter-thread stack references glen herrmannsfeldt <gah@ugcs.caltech.edu> - 2015-01-18 23:24 +0000
Re: Question about inter-thread stack references Stefan Monnier <monnier@iro.umontreal.ca> - 2015-01-18 08:35 -0500
Re: Question about inter-thread stack references Kaz Kylheku <kaz@kylheku.com> - 2015-01-18 17:12 +0000
Re: Question about inter-thread stack references Ivan Godard <ivan@ootbcomp.com> - 2015-01-18 12:49 -0800
Re: Question about inter-thread stack references jgk@panix.com (Joe keane) - 2015-01-25 09:27 +0000
Re: Question about inter-thread stack references Kaz Kylheku <kaz@kylheku.com> - 2015-01-25 18:46 +0000
Re: Question about inter-thread stack references jgk@panix.com (Joe keane) - 2015-01-27 02:53 +0000
csiph-web