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: Severe performance degradation with 386 enhanced mode, any tips? Message-ID: <23713@neptune.inf.ethz.ch> Date: 1 Feb 91 16:35:48 GMT References: <1991Jan16.224240.14201@news.iastate.edu> <1991Jan17.234310.6393@mintaka.lcs.mit.edu> <1991Jan20.183318.21088@vpnet.chi.il.us> <70249@microsoft.UUCP> Sender: news@neptune.inf.ethz.ch Reply-To: brandis@inf.ethz.ch (Marc Brandis) Organization: Departement Informatik, ETH, Zurich Lines: 51 Summary: In article <70249@microsoft.UUCP> davidds@microsoft.UUCP (David D'SOUZA) writes: >>In article <1991Jan17.234310.6393@mintaka.lcs.mit.edu> mikew@charm.LCS.MIT.EDU (Michael B. Williams) writes: >>>A few of us out here are experiencing the same problem, but no one has >>>yet suggested a solution that works. My NEC Powermate 386SX gives the >>>following SI times (values are approximate): >>> >>>Computing Index >>> From DOS (or Standard mode window): 15.2 >>> From 386 mode: 4.6 > > >Windows Enhanced mode uses 32 bit code. All memory accesses need to >be 32 bits wide. On 386 machines, motherboard memory fetches can be >done 32 bits at a time. Expansion memory is usually added to the >mother board in which case you have 32 bit access to the new memory. >Some, such as Compaq, have a dedicated memory expansion slot which >also allows memory to be fetched 32 bits at a time. Sorry, I do not want to start a flame war, but this is just plain nonsense in this context. First, Michael B. Williams has a 386SX, so all memory accesses are only 16 bits wide. Second, he is not measuring the speed of Windows but the speed of SI, which is 16 bit code. >However, if you add more memory to your 386 using old style cards which >plug into the AT style slots, you are hosed. This memory can only be >accessed 16 bits at a time (the hardware does this automatically). >Thus, it takes twice as long for the processor to fetch 32 bits from >here. You could even incur wait states between fetches making things >even slower. [some more comments about 16- and 32-bit code deleted] Well, now you are coming closer, but the problem is not the width of the bus but the wait states that you get when accessing memory over an AT bus. The difference between standard mode and enhanced mode is, that in standard mode DOS applications use the real mode of the processor (as under DOS), while in enhanced mode they are run in VM86 (virtual mode). Programs running in real mode can only use the first megabyte of memory, so the DOS program SI will always be loaded there. A VM86 can reside anywhere in memory and therefore SI may be loaded in some slow memory that is accessed over the AT bus. There is also some overhead coming from the use of VM86, as certain instructions cause a trap in VM86 and are then emulated by a Windows monitor. However, these instructions do not occur in the inner loop of SI that measures the speed index, so you should not notice a big difference due to this. Marc-Michael Brandis Computer Systems Laboratory, ETH-Zentrum (Swiss Federal Institute of Technology) CH-8092 Zurich, Switzerland email: brandis@inf.ethz.ch