Article View: comp.sys.ibm.pc.programmer
Article #1475Re: Caches and Extended Memory
From: Stephen M. Dunn
Date: Sun, 11 Mar 1990 06:03
Date: Sun, 11 Mar 1990 06:03
40 lines
2482 bytes
2482 bytes
In article <9003091838.AA21834@decwrl.dec.com> stoppani@slough.enet.dec.com (Pete Stoppani) writes:
$My understanding is that memory above 1Meg (except for the first
$64k above 1Meg) is accessible only when a 268/386/486 is in protected mode.
$How does a hard disk cache driver use extended memory on a system running
$MS-DOS? Does it switch to protected mode? Do the machines run in
$protected mode all the time? Neither seems right...What am I missing?
The former is correct. Programs written for real mode operation
(i.e. 8086 programs) will not run in protected mode for several reasons
(the big one being that segment registers are used completely differently
in protected mode).
What happens when your disk cache (or ramdrive) needs to access extended
memory is as follows:
- it prepares to switch into protected mode and then does the switch
- it copies the data to/from the appropriate memory locations
and then, since the 286 has no way to quitely go back into real
mode, the program has to:
- get the keyboard controller to reset the CPU
- restore the status from earlier
The data has now been transferred to/from extended memory, and the
program can continue to run as usual.
Note that in the process of resetting the processor (which takes
times on the order of 100 microseconds, I believe), interrupts can be
missed, which is why you should never use a disk cache in extended
memory while using a serial port at high speed (since to achieve
reliable high-speed transmission you need to use interrupts, and you
will miss some). Disk caches in conventional and expanded memory,
as well as those implemented in hardware on the controller board, are
fine.
--
Stephen M. Dunn cs4g6ag@maccs.dcss.mcmaster.ca
<std_disclaimer.h> = "\nI'm only an undergraduate!!!\n";
****************************************************************************
"So sorry, I never meant to break your heart ... but you broke mine."
Technical Details
Message-ID:
<25F9EA26.21884@maccs.dcss.mcmaster.ca>Path:
arc1-ca.pugleaf.net!utzoo!attcan!lsuc!maccs!cs4g6agReferences:
<9003091838.AA21834@decwrl.dec.com>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!lsuc!maccs!cs4g6ag From: cs4g6ag@maccs.dcss.mcmaster.ca (Stephen M. Dunn) Newsgroups: comp.sys.ibm.pc.programmer,comp.sys.ibm.pc Subject: Re: Caches and Extended Memory Message-ID: <25F9EA26.21884@maccs.dcss.mcmaster.ca> Date: 11 Mar 90 06:03:17 GMT References: <9003091838.AA21834@decwrl.dec.com> Reply-To: cs4g6ag@maccs.dcss.mcmaster.ca (Stephen M. Dunn) Organization: McMaster University, Hamilton, Ontario Lines: 40