Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!wuarchive!uunet!cme!libes From: libes@cme.nist.gov (Don Libes) Newsgroups: comp.unix.internals Subject: Re: threads without kernel mods Message-ID: <3459@muffin.cme.nist.gov> Date: 27 May 91 18:17:44 GMT References: <213@titccy.cc.titech.ac.jp> <1991May20.123423.10388@linus.mitre.org> <4815@skye.ed.ac.uk> Organization: National Institute of Standards and Technology Lines: 21 In article <4815@skye.ed.ac.uk> richard@aiai.UUCP (Richard Tobin) writes: >> I need to know about implementing threads or lightweight processes >>without modifying kernel - ie strictly user level implementations. >[Setjmp/longjmp work, but] you still have the problem of getting >onto a new stack in the first place. Under BSD-like systems you may >be able to use a completely disgusting hack due I think to Simon >Brown, which involves using sigstack() to set up an alternative >stack for signal handlers, and then sending yourself a signal. As long as you're assigning credit, in the July '87 ;login:, I described this technique, complete with preemptive scheduling all in user code. The paper was heavily circulated in '86, and while I don't know of an earlier published description, I suspect that whoever designed the BSD signal mechanism did so for exactly this purpose. (Otherwise, the presence of some of the signal features are rather inexplicable.) If they didn't ever create user-level LWPs, they should at least get credit for making it possible. Don Libes libes@cme.nist.gov ...!uunet!cme-durer!libes