coop/preempt [was: Re: release 0.0.0.20 and thoughts]

Tommy Hallgren SA435@utb.shv.hb.se
Tue, 22 Aug 1995 08:28:08 MET-1MEST


Billy wrote:
> On Mon, 21 Aug 1995, Rainer Blome wrote:
> 
> > how much speedup do we get from coop?  will it be so much that it is worth
> > investing the time needed to implement it?
> 
> A _very_ good question, worthy of testing, IMO.

They way I see it it will slow down things. For example, the Amiga uses 
messages to send commands to devices, let's say I make a program that
send a command to the harddrive device that says 'read 100 tracks and put it 
here'. On the Amiga, the transfer from the drive to memory is probably DMA-
driven so the device suspends itself until the transfer is done. And when the 
transfer is done the device code will be awaken immediately since device tasks 
run at a higher priority, and the first things the device does is to reply the 
message.

As I see it this will probably max out the harddrive even with a slow processor.

Can anyone explain how coop mt can be used to elegantly do equally same 
performance wise?

> > what is the users' model (abstract view) of a the machine?  normally, you
> > don't to care about the coop/preempt issue, it's an implementation detail
> > of the os.  of course, sometimes some power-user does care.

I would really hate a cooperative mt system. Different tasks have different 
importance and only with pre-emptive mt it's possible to make a responsive and 
flexible os.

> Implementing coop will be incredibly easy.  Implementing proofs will be 
> dramatically harder, BUT will allow many good things.

Once pre-emptive mt have been implemented the entire OS will be better, IMO.

> 1) preemptive is far harder to implement than coop.

Have you tried?

> 3) coop is easy to run under preemptive; you can just compile out the 
> yields (or even just keep them in).

If you have pre-emptive, why should you want to implement coop?


Mvh: Tommy Hallgren(sa435@utb.shv.hb.se) IRC: D-Bug

... A C64 is like a clitoris - It's small, 
    pretty badly designed, not very powerful,
    and yet it's one of the best things you'll ever touch...
    
    - Anonymous at comp.sys.cbm