Mail Archives: djgpp/1997/09/10/17:34:10
Albert Theo Hofkamp schrieb:
> In article <5v3icu$g7s$1 AT sun1000 DOT pwr DOT wroc DOT pl>,
> _stary_ AT geocities DOT com writes:
> > What does `locking' mean? The FAQ mentions two funcitons: one for
> > locking code and one for data, but it doesn't explain what they ACTUALLY
> > do! All I know is that I should `lock' all data and code `seen' by my
> > interrupt handling routine. I feel a bit uneasy about not knowing why
> > I'm doing something.
>
> Basically, you tell the OS not to swap that memory to disk.
> 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
- Raw text -