in reply to (crazyinsomniac) Re: MacPerl???
in thread MacPerl???
One of the basic jobs of an operating system is to coordinate between different processes/threads. The two basic choices are cooperative multitasking and pre-emptive multitasking.
In cooperative the OS hands control to a process/thread and then waits for control to be handed back. In pre-emptive, control is handed over but the OS will grab control back when it wants. It will want control back after various interrupts, when the process asks for the OS to do something, or at the end of your time slice.
All of the issues that I discussed in Threads vs Forking (Java vs Perl) simply do not exist for cooperative multitasking. There is never any problem with unexpected interruptions because nobody is going to interrupt you. But on the flip side any process can lock up the whole system permanently. Furthermore pre-emptive both can accomplish background tasks faster and is more responsive. (Ironically, throughput on batch jobs can be higher in cooperative - there is no need to worry about locking and unlocking.)
MacOS is cooperative. DOS was. Ditto Windows 3.1. Microsoft claims that the Win9x line is pre-emptive, but in truth it is a hybrid, cooperatively multitasking 16-bit programs and pre-emptively multitasking 32-bit ones. (This was probably wise, if you pre-emptively multitask a process that was written for cooperative multitasking, a lot of race conditions come out of the woodwork.)
By comparison Windows NT, BeOS, any form of *nix, VMS and so on are all pre-emptively multitasked. Indeed so is OS X. Virtually anything billed as heavy-duty, certainly anything that can use 2 CPUs, have multiple users at once, etc are pre-emptive.
What this means is that on the Mac a single poorly-written process can lock up the system. Similarly if you go to the menu bar, while you are viewing the menu nothing else is going on. Your webserver is unavailable, your print jobs are not spooling, and SETI is going on without you...
This is true for virtually no other OS you are likely to encounter today.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Bad multitasking (RE: MacPerl???)
by tye (Sage) on Oct 10, 2000 at 18:29 UTC | |
by tilly (Archbishop) on Oct 10, 2000 at 18:56 UTC | |
by tye (Sage) on Oct 10, 2000 at 19:45 UTC | |
by tilly (Archbishop) on Oct 10, 2000 at 21:01 UTC | |
by tilly (Archbishop) on Oct 10, 2000 at 21:05 UTC | |
by tilly (Archbishop) on Oct 10, 2000 at 21:02 UTC | |
by tilly (Archbishop) on Oct 10, 2000 at 21:04 UTC |