home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / os / msdos / programm / 10368 < prev    next >
Encoding:
Text File  |  1992-11-06  |  3.0 KB  |  66 lines

  1. Newsgroups: comp.os.msdos.programmer
  2. Path: sparky!uunet!charon.amdahl.com!pacbell.com!decwrl!sdd.hp.com!caen!sol.ctr.columbia.edu!The-Star.honeywell.com!umn.edu!mmm.serc.3m.com!pwcs!cdsmn!wells
  3. From: wells@cdsmn.mn.org (Rich Wells)
  4. Subject: Re: Windows Multitasking
  5. Message-ID: <Bx98zz.BEA@cdsmn.mn.org>
  6. Organization: Dicomed, Inc
  7. X-Newsreader: TIN [version 1.1 PL6]
  8. References: <1992Nov2.180829.25719@mksol.dseg.ti.com>
  9. Date: Thu, 5 Nov 1992 18:07:09 GMT
  10. Lines: 54
  11.  
  12. fred j mccall 575-3539 (mccall@mksol.dseg.ti.com) wrote:
  13. : In <mortenk.65.720660018@dhhalden.no> mortenk@dhhalden.no (MORTEN KNUDSEN) writes:
  14. : >In article <etxansk.720194534@garbod20> etxansk@garbo.ericsson.se writes:
  15. : >>From: etxansk@garbo.ericsson.se
  16. : >>
  17. : >> One simple question: By reading a chapter in Charles Petzold's
  18. : >>"Programming Windows" I got the impression that Windows programs
  19. : >>have to divide time-consuming tasks into a number of sub-tasks
  20. : >>in order to let other Windows programs get some execution time.
  21. : >>
  22. : >> Is this true? Does the sharing of system time depend on all
  23. : >>processes running? In that case, isn't it annoying to write
  24. : >>compilers etc for Windows? 
  25. : >I think discribing windows as multitasking is an overstatement. It's more 
  26. : >like reentrant. If you have tried OS/2, you'll know what I mean.
  27. : I really wish people wouldn't write things when they don't know what
  28. : they're talking about.
  29. : Please define the following words:  'multitasking', 'reentrant'.
  30. : Describe the different types of multitasking and their advantages and
  31. : disadvantages. 
  32. : [Once you have answered the preceding questions, please explain why
  33. : the statement above concerning Windows, OS/2, multitasking, and
  34. : reentrant is silly.]
  35.  
  36. Gee, Fred, you missed an opportunity to enlighten us with your
  37. infinite wisdom, but wasted it on a senseless flame.  C'mon, the
  38. least you can do when you flame is to answer the original question.
  39.  
  40. So, to answer the original question, Windows multitasking depends
  41. on each program calling a certain set of routines -- GetMessage,
  42. PostMessage, and a few others -- often enough to let Windows
  43. switch to another task needing some time.  So if you have some
  44. heavy-duty processing to do, try and split it into chunks and
  45. do a little at a time, calling one of these functions periodically
  46. to let Windows do its thing.  In other words, the onus is on the
  47. programmer, not the compiler, to allow Windows to multitask.
  48. Most good books on Windows programming will supply code to
  49. demonstrate this.
  50.  
  51. But, just to confuse matters, if you have Windows running in
  52. enhanced mode, Windows will use pre-emptive multitasking to
  53. switch between DOS sessions and the one Windows session.  My
  54. knowledge of this is slim (in fact, I don't think "session"
  55. is the right word, but I trust you know what I mean by it), so
  56. I'll defer any further explanation to one who really knows,
  57. especially since we have Fred the watchdog double-checking
  58. our posts (1/2 :-).
  59. -- 
  60.  
  61. Richard Wells  wells@cdsmn.mn.org  or  ...!tcnet!cdsmn!wells
  62.