Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!mcsun!cernvax!chx400!bernina!neptune!inf.ethz.ch!brandis From: brandis@inf.ethz.ch (Marc Brandis) Newsgroups: comp.windows.ms Subject: Re: Performance degradation in 386 enhanced mode Message-ID: <22078@neptune.inf.ethz.ch> Date: 21 Jan 91 12:39:59 GMT References: <4491@mindlink.UUCP> <1991Jan19.033005.8733@mintaka.lcs.mit.edu> Sender: news@neptune.inf.ethz.ch Reply-To: brandis@inf.ethz.ch (Marc Brandis) Organization: Departement Informatik, ETH, Zurich Lines: 32 In article <1991Jan19.033005.8733@mintaka.lcs.mit.edu> mikew@athena.mit.edu (Michael B. Williams) writes: >|> Well, if I understand correctly, DOS systems built around the 286 and >|> 386 use the keyboard controller chip to switch between real mode (the >|> only place you can run DOS) and protected mode (where Win3 in 386 mode >|> lives, and also required for HIMEM.SYS to operate). This is not true for the 386. On the 286, there is no way to switch from protected mode to real mode except by resetting the CPU, which can be achieved by using some circuitry in the keyboard controller. This takes a rather long time, so in this respect the comment is correct. It is also correct that the required switching sequence depends on the keyboard and that there are large differences in the execution times of them. However, the 386 is a completely different story. First, there is a fast way to switch back and forth between protected mode and real mode, which is controlled by one bit in CR0. All you have to do to switch is to set or reset this bit (can be done in something like 15 cycles). Second, if Windows has to switch to real mode for any reason and it is running on a 386, it uses this method instead of the clumsy reset on the 286. This is even true if no enhanced mode is used (that is, in standard mode). But the important point is that Windows in enhanced mode does very rarely require to switch back to real mode, as DOS programs can be run in virtual mode (which is a special kind of protected mode), so the whole story about mode switching does not apply. There is only a task switch to switch to a program in virtual mode, no processor mode switch as on the 286. Marc-Michael Brandis Computer Systems Laboratory, ETH-Zentrum (Swiss Federal Institute of Technology) CH-8092 Zurich, Switzerland email: brandis@inf.ethz.ch