threads without kernel mods

Don Libes libes at cme.nist.gov
Tue May 28 04:17:44 AEST 1991


In article <4815 at skye.ed.ac.uk> richard at 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 at cme.nist.gov      ...!uunet!cme-durer!libes



More information about the Comp.unix.internals mailing list