www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/09/11/03:32:03

Date: Thu, 11 Sep 1997 10:31:20 +0300 (IDT)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: Georg Kolling <Georg DOT Kolling AT t-online DOT de>
cc: a DOT hofkamp AT wtb DOT tue DOT nl, djgpp AT delorie DOT com
Subject: Re: Tell me something about `locking' (please).
In-Reply-To: <m0x8uNW-0003CuC@fwd09.btx.dtag.de>
Message-ID: <Pine.SUN.3.91.970911103051.12402D-100000@is>
MIME-Version: 1.0

On Wed, 10 Sep 1997, Georg Kolling wrote:

> > The reason is that in the interrupt vector of the machine you set the
> > address of your routine, and the machine expects it to find it there when
> > the interrupt occurs, which might not be the case if the OS is allowed to
> > swap the memory out.
> 
> This wouldn't be a real problem since accessing swapped pages causes an
> exception where the OS exception handler should write those pages back to
> memory. The big problem is time since your program isn't expecting a memory
> access to take a few seconds, which can mess up your program if it depends on
> timer interrupts

No, the swap-in *is* the real problem, because DOS is non-reentrant.
Swapping in from disk requires a DOS function, and if the interrupt
that caused those pages to be swapped in itself happened when some
other DOS function was in progress (e.g., the foreground program was
reading a file), your system will crash.

Having a hardware interrupt serviced slowly is bad, but not as bad as
crashing the entire machine.

- Raw text -


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