home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / sys / apple2 / 26583 < prev    next >
Encoding:
Text File  |  1993-01-08  |  3.4 KB  |  75 lines

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