delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/10/29/02:20:48

Date: Tue, 29 Oct 1996 08:58:07 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: stow AT sask DOT usask DOT ca
Cc: djgpp AT delorie DOT com
Subject: RE: Preemptive Multitasking under DPMI
In-Reply-To: <28OCT96.22083606@skyfox.usask.ca>
Message-Id: <Pine.SUN.3.91.961029085031.18709M-100000@is>
Mime-Version: 1.0

On 28 Oct 1996 stow AT sask DOT usask DOT ca wrote:

> Preemptive M.T. requires that the operating system (including extensions
> to the OS, such as when you run Borlands DPMI interface) be able to stop
> one process when the _OS_ decides it is a good time, and give a few
> time slices to another process.  DOS, Win 3.x don't have that capability
> at all.

With all due respect, what's wrong about a scheduler getting control on a
timer tick (by hooking the timer interrupt) and switching tasks when ``i
decides it is a good time''?  Isn't this as preemptive as you can get?  If
so, this capability is there in both DOS and Windows.  It is unsupported
by the OS, true, so you have lots of things to do on your own, but it's
far from impossible.  Even ye olde PRINT.COM does this for a long time. 

> A good example of the failure of all of those OSes to implement pre-emptive
> multitasking is that once you start a floppy formatting you are shut out from 
> doing anything else until the format is done, even though formatting a floppy

Last time I looked, Windows 95 also doesn't stop everything else when you 
format a floppy.  The BIOS has hooks that you can use to do something 
when the system is waiting for a track to be formatted, it's just that 
DOS file I/O functions don't use those hooks.  But nobody prevents you 
from using them in a multi-tasker.

Mind you, I don't want to start an OS holy war here, just to make the 
case more objectively described.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019