Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!nuchat!sugar!peter From: peter@sugar.hackercorp.com (Peter da Silva) Newsgroups: comp.sys.amiga.misc Subject: Re: True Multitasking Message-ID: <7633@sugar.hackercorp.com> Date: 28 Jan 91 04:23:04 GMT References: <42149@nigel.ee.udel.edu> <15750@sdcc6.ucsd.edu> <42154@nigel.ee.udel.edu> Reply-To: peter@sugar.hackercorp.com (Peter da Silva) Organization: Sugar Land Unix - Houston Lines: 22 In article <42154@nigel.ee.udel.edu> new@ee.udel.edu (Darren New) writes: > So you mean that the Amiga is full of LWPs and the Mac is full of CRs? :-) No, both are full of *processes*. The difference between LWPs and CRs is that CRs specify the routine to continue on the context switch. Cooperative Multitasking (CM) is an implementation of LWPs using a scheduler to transparently select the next coroutine to execute. I posted an implementation of CM using CRs in C to one of the comp.unix groups a year or so ago. I used setjmp/longjmp to do the co-call with some unspecified magic juju to set up the stack. > Correct me if I'm wrong, but I think you are saying that CRs are > non-preemptive. -- Darren CR are non-scheduled. To confuse things further, the traditional UNIX kernel is implemented as a set of coroutines that call the scheduler as a subroutine. The UNIX kernel is non-preemptive, but UNIX user processes are preemptable. -- Peter da Silva. `-_-' .