From: jaggy@purplet.demon.co.uk (Mike Jagdis) Subject: some quick questions Date: 12 Feb 1993 23:38:00 GMT
* In message <1lfctaINNc2u@senator-bedfellow.MIT.EDU>, Douglas Muir said:
DM> As the subject states, just a few quick questions. First,
DM> from what I can tell, linux does not have threads. Is this correct?
Sure Linux has threads. It's just that the kernel only allows each process
one... :-)
DM> If so, how hard would
DM> it be to implement them? What's involved.
Basically we need to separate the VM context of the process from the actual
execution context. Then we can have several execution contexts sharing the
same VM. Of course there are added complications such as needing different
stack regions and supporting thread-private data areas. There needs to be a
fair amount of work on the memory manager and task routines. I'm thinking
about it but in the meantime I'm working on implementing user level threads
using setjmp/longjmp and healthy doses of black magic, human sacrifices etc.
(Actually implementing threads like this is mainly juggling linked lists -
but everyone seems to think it's hard so who am I to let on? :-) )
Mike