[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: cooperative multitasking
- From: Sean Middleditch <elanthis@...>
- Date: 07 Jun 2002 12:34:12 -0400
On Fri, 2002-06-07 at 12:30, Tom Wrensch wrote:
> On 7 Jun 2002, Sean Middleditch wrote:
>
> > Yes, I meant it as a toy multi-tasker.
>
> Hmm, well you're origional request was for cooperative multitasking. I'm
> going to assumey you are NOT talking about a system that uses timeslices
> or some such, but rather one where the various processes give up their
> turn at the processor by calling some particular routine.
What, did I start this thread? (short memory span...) ~,^
>
> If that's the case then it should be a simple matter to build a process
> scheduler that turns this "toy" into a true cooperative multitasking
> system.
I'm not seeing how it would work - the co-routines actually only allow
one process to work at a time, and the thread has to give up it's right
to run. Long-running threads with lots of processing would be sprinkled
with yield calls, no?
Or I suppose one could use the line-hook, although that would be quite
slow.
>
> Unless someone beats me to it I expect I'll have one done in an hour or
> two.
>
> - Tom
>