[comp.sys.ibm.pc.hardware] Windows 3.0 is pre-emptive?

ergo@netcom.UUCP (Isaac Rabinovitch) (08/16/90)

In <12512@leadsv.UUCP> zech@leadsv.UUCP (Bill Zech) writes:



>Windows 3.0 apparently multitasks DOS programs via a simple time-slice
>algorithm, and anybody familiar with sampling theory can see how
>this will produce bogus results with the music playback code.  The result
>is very intermittent notes.  

Your logic is certainly sound (excuse the pun).  But I'm a little
puzzled as to how this could be happening under Windows.  If it were
happening under DesqView or another pre-emptive multitasker, it'd make
sense.  But it's my understanding that Windows is non-premptive --
that is, a task switch only occurs when a task relinquishes control.
Perhaps W3.0 added pre-emption?

Then again, a task doesn't always relinquish control explicitly, at
least on the source-code level.  I have a cute little litle
non-pre-emptive multitasking package somebody kludged up for Turbo C.
It plants hooks to the "your turn" call in the screen and keyboard I/O
routines, so a task is passing control every time it interacts with
the user.  Perhaps your program is using routines with a similar hook
to Windows?

The above blather may all be a reflection of my total ignorance about
Window.  If anybody has the impulse to educate me, please don't fight
it!

>BTW, I have developer's kits for both the Adlib board and the Sound
>Blaster.  They are better than nothing, but I think they are rather
>poorly packaged and documented for the money.
Not a big suprise.  Really good technical writing costs $30+ a page.
Not much, compared to the cost of hardware and software engineering,
but more than tiny startups are usually willing to pay.  I suppose the
owner/engineers consider their contributions sweat equity, while
hiring a tech writer costs real money.


-- 

ergo@netcom.uucp			Isaac Rabinovitch
atina!pyramid!apple!netcom!ergo		Silicon Valley, CA
uunet!mimsy!ames!claris!netcom!ergo

Disclaimer:  I am what I am, and that's all what I am!

strobl@gmdzi.UUCP (Wolfgang Strobl) (08/18/90)

ergo@netcom.UUCP (Isaac Rabinovitch) writes:

>    ...                                                But I'm a little
>puzzled as to how this could be happening under Windows.  If it were
>happening under DesqView or another pre-emptive multitasker, it'd make
>sense.  But it's my understanding that Windows is non-premptive --
>that is, a task switch only occurs when a task relinquishes control.
>Perhaps W3.0 added pre-emption?

Windows/286 (up to version 2.11) is non-preemptive. Windows/386
and now Windows 3.0 in enhanced mode (i.e. on a 386 with 2 MB or more)
do preemptive multitasking, for old DOS applications. All the running
Windows applications run in one single VM and do cooperative, nopreemptive
multitasking, there. For each DOS application Win 3 starts yet another
VM and does preemptive multitasking among the running VM's.

Wolfgang Strobl
#include <std.disclaimer.hpp>

KRW1@Lehigh (08/19/90)

Under certain circumstances, Win 3 will also speed up the system
timer...having an interesting effect on sound and music programs.
And some of those reprogram the timer as well.  Nasty business....
-- Kevin

strobl@gmdzi.UUCP (Wolfgang Strobl) (08/20/90)

KRW1@Lehigh writes:

>Under certain circumstances, Win 3 will also speed up the system
>timer...having an interesting effect on sound and music programs.
>And some of those reprogram the timer as well.  Nasty business....

I have noticed this behaviour too, but was not able to determine
under what circumstances it does do that. Do you have more info?
Thanks.
 
Wolfgang Strobl