🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.mach
Article #1218

Stack space for threads

#1218
From: Ian Dall
Date: Thu, 14 Dec 1989 10:25
19 lines
1492 bytes
How is automatic variable space handled for threads? I can think of
two possibilities. One is to give each thread its own copy of the
stack marked copy write and the other is to allocate some chunk of
memory and set the stack to the top of it. The first means that
starting a new thread is like a semi fork. The stack gets copied but
the data region (and of course the text region don't). This approach
has the effect that threads can never modify each others automatic
variables, even through pointers. It has the advantage, however, that
the virtual address space is kept simple.  Otherwise the virtual
address space gets fragmented and this could be a pain if one can't
predict how much the various regions will grow. Of course with very
large virtual address spaces this is less of a problem.

Would someone like to briefly summarize the Mach thread primitives?

-- 
 Ian Dall           life (n). A sexually transmitted disease which afflicts
                              some people more severely than others.
idall@augean.oz
Technical Details
Message-ID: <688@augean.OZ>
Path: arc1-ca.pugleaf.net!utzoo!attcan!utgpu!jarvis.csri.toronto.edu!clyde.concordia.ca!mcgill-vision!bloom-beacon!snorkelwacker!apple!usc!samsung!munnari.oz.au!mimir!hugin!augean!idall

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!utgpu!jarvis.csri.toronto.edu!clyde.concordia.ca!mcgill-vision!bloom-beacon!snorkelwacker!apple!usc!samsung!munnari.oz.au!mimir!hugin!augean!idall
From: idall@augean.OZ (Ian Dall)
Newsgroups: comp.os.mach
Subject: Stack space for threads
Message-ID: <688@augean.OZ>
Date: 14 Dec 89 10:25:46 GMT
Reply-To: idall@augean.OZ (Ian Dall)
Organization: Engineering Faculty, University of Adelaide, Australia
Lines: 19