[comp.windows.ms] Paging of non-windows applications

gmurray@ibmpcug.co.uk (G Murray) (05/13/91)

 
 Sorry if this has been asked before, but I haven't been reading this
group for long.


 In 386 enhanced mode, windows 3 implements virtual memory using
hardware paging. However, when attempting to run a non-windows
application it seems to require enough contiguous physical memory for
the application to run. Also the delays and disk accesses that can
occur when switching between non-windows applications seems to
indicate that the whole Virtual 8086 VM is swapped as one unit,
either all in RAM or all swappped out.

 So, is there any reason why windows doesn't page non-windows
applications? I have read the Intel 80386 manuals and can see nothing
that would indicate that a V8086 VM can't use paging. The way that I
understand that it would work would be that if the Real Mode
application (in the V8086 VM) attempts to access a memory location
that is not present in RAM, a page fault exception is generated,
which is serviced by the Protected mode code in the same way as a
page fault occuring in a protected mode (ie windows) application. The
page is then brought into memory and following the IRET from the
exception handler, the Real mode application continues as if nothing
had happened. As I understand it, the one thing that must never be
paged is the page fault exception handler.

 Have I misunderstood the way that paging and page faults are handled
in Virtual 8086 mode? If I haven't misunderstood it, then is there
some other reason why Windows cannot allow a non-windows application
to be paged? 


----------------------------------------------------------------------
Graham Murray			  Email gmurray@ibmpcug.co.uk
Senior Programmer		    OR  gmurray@cix.compulink.co.uk
Gravatom Technology Ltd		  Voice +44 329 823986
----------------------------------------------------------------------



-- 
Automatic Disclaimer:
The views expressed above are those of the author alone and may not
represent the views of the IBM PC User Group.
-- 

tj@gpu.utcs.utoronto.ca (Terry Jones) (05/14/91)

>the application to run. Also the delays and disk accesses that can
>occur when switching between non-windows applications seems to
>indicate that the whole Virtual 8086 VM is swapped as one unit,
>either all in RAM or all swappped out.

I ran into an interesting example of this the other evening. It was a complex
affair where I had just installed a second adapter (mono) with my VGA and
in a DOS window I typed mode mono to go to the other screen. There I started
DOS Kermit and dialed a host and started a download. Swapped back to program
manager with Alt-Esc and things were fine. Transfer going fine, windows going
fine. I could load other applications like PaintBrush OK. Then I started WinGif
to look at a file. Things were fine until I did a File Open from WIngif. Kermit
and WinGif were trying to access the same disk (not same file). Kermit swapped
out. WIngif read some file. Kermit swapped in to write to disk, wingif stopped,
kermit swapped out, wingif did some more. Lets just say performance was not
quite what I am used to on this 386sx with 5 meg RAM! Disk was getting its
daily exercise.

I then repeated the experiment but this time I had Kermit download to a
floppy drive instead. No swapping. 

Any thoughts?