home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.os.msdos.programmer
- 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
- From: wells@cdsmn.mn.org (Rich Wells)
- Subject: Re: Windows Multitasking
- Message-ID: <Bx98zz.BEA@cdsmn.mn.org>
- Organization: Dicomed, Inc
- X-Newsreader: TIN [version 1.1 PL6]
- References: <1992Nov2.180829.25719@mksol.dseg.ti.com>
- Date: Thu, 5 Nov 1992 18:07:09 GMT
- Lines: 54
-
- fred j mccall 575-3539 (mccall@mksol.dseg.ti.com) wrote:
- : In <mortenk.65.720660018@dhhalden.no> mortenk@dhhalden.no (MORTEN KNUDSEN) writes:
- : >In article <etxansk.720194534@garbod20> etxansk@garbo.ericsson.se writes:
- : >>From: etxansk@garbo.ericsson.se
- : >>
- : >> One simple question: By reading a chapter in Charles Petzold's
- : >>"Programming Windows" I got the impression that Windows programs
- : >>have to divide time-consuming tasks into a number of sub-tasks
- : >>in order to let other Windows programs get some execution time.
- : >>
- : >> Is this true? Does the sharing of system time depend on all
- : >>processes running? In that case, isn't it annoying to write
- : >>compilers etc for Windows?
- :
- : >I think discribing windows as multitasking is an overstatement. It's more
- : >like reentrant. If you have tried OS/2, you'll know what I mean.
- :
- : I really wish people wouldn't write things when they don't know what
- : they're talking about.
- :
- : Please define the following words: 'multitasking', 'reentrant'.
- : Describe the different types of multitasking and their advantages and
- : disadvantages.
- :
- : [Once you have answered the preceding questions, please explain why
- : the statement above concerning Windows, OS/2, multitasking, and
- : reentrant is silly.]
-
- Gee, Fred, you missed an opportunity to enlighten us with your
- infinite wisdom, but wasted it on a senseless flame. C'mon, the
- least you can do when you flame is to answer the original question.
-
- So, to answer the original question, Windows multitasking depends
- on each program calling a certain set of routines -- GetMessage,
- PostMessage, and a few others -- often enough to let Windows
- switch to another task needing some time. So if you have some
- heavy-duty processing to do, try and split it into chunks and
- do a little at a time, calling one of these functions periodically
- to let Windows do its thing. In other words, the onus is on the
- programmer, not the compiler, to allow Windows to multitask.
- Most good books on Windows programming will supply code to
- demonstrate this.
-
- But, just to confuse matters, if you have Windows running in
- enhanced mode, Windows will use pre-emptive multitasking to
- switch between DOS sessions and the one Windows session. My
- knowledge of this is slim (in fact, I don't think "session"
- is the right word, but I trust you know what I mean by it), so
- I'll defer any further explanation to one who really knows,
- especially since we have Fred the watchdog double-checking
- our posts (1/2 :-).
- --
-
- Richard Wells wells@cdsmn.mn.org or ...!tcnet!cdsmn!wells
-