home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.apple2
- Path: sparky!uunet!elroy.jpl.nasa.gov!swrinde!cs.utexas.edu!sun-barr!ames!agate!boulder!csn!teal!bazyar
- From: bazyar@teal.csn.org (Jawaid Bazyar)
- Subject: Re: Coop. vs preemptive multitasking (was Re: SwitchItpress release)
- Message-ID: <bazyar.726508915@teal>
- Sender: news@csn.org (news)
- Nntp-Posting-Host: teal.csn.org
- Organization: Colorado SuperNet, Inc.
- References: <1ijbkuINNq8@usenet.INS.CWRU.Edu>
- Date: Fri, 8 Jan 1993 16:01:55 GMT
- Lines: 62
-
- cd248@cleveland.Freenet.Edu (Richard Sherman) writes:
-
- >>Indeed. MultiFinder is touted as multitasking but that's pushing it a
- >>bit; without *pre-emptive* multitasking it's still just
- >>Super-Switcher. As Scott Anderson (I think) said, it's at the mercy
- >>of disk drive/SCSI/serial port/etc. access, which is often VERY
- >>annoying (STUPID PROGRAM! I DIDN'T *REALLY* WANT TO UNSTUFF THAT 20MB
- >>ARCHIVE!).
- >
- >
- >Actually, I thought Multifinder was just a switcher and didn't really
- >RUN all the programs at once, as opposed to system 7.0. I could be
- >wrong about this.
-
- You are. :-)
-
- >Also, what is the big advantage of preemptive multitaksing on a single
- >user system? I asked this same question on comp.sys.mac.system and what
- >it came down to was that cooperative multitasking (system 7.0) only
- >hands control over to the background programs when the foreground
- >program is waiting for user input (most programs spend about 80% of
- >their time waiting for user input). While preemptive multitasking
- >hands control over after a designated time period. What makes
- >cooperative multitasking bad is that a program could hog the cpu if it
- >weren't written right. This might be valid for other computers but on a
- >mac (and a GS I think), control is given to the background programs
- >whenever GetNextEvent is called. The programmer would have to write the
- >program without using GetNextEvent for it to take over the cpu.
-
- Incorrect. The big difference between preemptive and cooperative
- multitasking is that with cooperative, the programmer has to
- specifically code his application to work properly with other programs.
- With preemptive multitasking, there's no such nonsense. You simply
- write your program. This has the added benefit that the OS can
- schedule tasks (and how long they run per time slice) according
- to various priority mechanisms. This is infinitely superior to
- any cooperative system.
-
- >I'm not sure what you mean by "at the mercy of disk and serial port
- >interrupts". I do know that you can do other things on a Mac with
- >system
- >7.0 while your copying files etc. I also know that it's possible to use
- >other parts of AWGS while you're downloading a file with its (useless)
- >communications module.
-
- Try copying files over an AppleTalk connection; try formatting a
- floppy disk. Any time a Mac or IIgs does a disk access or otherwise
- takes its attention away from the serial ports, it will lose data
- big-time.
-
- >I know preemptive is a better multitasking algorithm but so far I
- >haven't been convinced that it's the only "real" multitasking. This
- >idea seems to have been made up by people trying to sell Amigas.
-
- It's the only real multitasking. Cooperative works, but on the
- Mac it's a hack and will always be kludgy.
-
- --
- Jawaid Bazyar | Ask me about the GNO Multitasking Environment
- Procyon, Inc. | for the Apple IIgs!
- bazyar@cs.uiuc.edu | P.O Box 620334
- --Apple II Forever!-- | Littleton, CO 80162-0334 (303) 933-4649
-