Mail Archives: djgpp/1997/04/23/13:57:35
On Tue, 22 Apr 1997, Eduard Ralph wrote:
> When you try to access a page of memory (beign 4k big) which is
> currently swapped to disk, the processor generates an exception. From
> there the handler takes over. It chooses a page which was accessed the
> least, though it can choose any one, swaps that to disk and then loads
> the page from disk. It then proceeds to change the GDT or IDT what
> ever to correct the info and then calls up the instruction which
> caused this fault. Generally it work fine and the software continues
> as if it had never been interrupted.
> The DPMI Server, which takes over this job, must know which are
> swapped out and which are not, because a flag in the Table tells him
> of the status.
yes that is correct. there is a bit in the descriptor "p" (for present
i think, check the libc.a docs for __dpmi_get_descriptor(...)) which
tells whether the segment is present in ram or paged. in fact i just
discovered that virtual memory managers use this bit for their jobs.
- Raw text -