Mail Archives: djgpp/1997/09/11/03:32:03
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 -