Date: Mon, 9 Mar 1998 14:57:01 +0100 (MET) From: Hans-Bernhard Broeker To: Vik Heyndrickx cc: Eli Zaretskii , djgpp-workers AT delorie DOT com Subject: Re: Temporary files considered unsafe In-Reply-To: <3503D9F5.1D0E@rug.ac.be> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Precedence: bulk > > > I though the DOS conventional memory was common to all DOS boxes, or am > > > I so wrong? > > It is not common, it is mapped into all DOS boxes, but it is kept > > separate. Windows twiddles the memory page directory when it multi-tasks > > DOS apps, so that each DOS app gets a separate address space, but the > > real-mode addresses are the same. > > I don't understand "mapped into all DOS boxes" vs. "kept separate". > Either any DOS program has a different "below 640Kb + UMB" address > space, or it has the same. > You imply the first? You say 'either ... or'. The truth is: neither. MMU's can do some really wonderful things, among them the one used by (386 enhanced mode and up) Windows: you *map* existing memory into the address space of, say, a virtual DOS machine (i.e.: a DOS box window). So, at startup time, they all see the 1st megabyte as it was before Winblows got started. But that memory is mapped as *write-protected*, so if any of those DOS boxes tries to modify it, Winblows will receive a protection violation. Now, it will *copy* the content of that page (4KB), and map the copied version into the address space of the DOS box that tried to modify it. Result: they all share what they don't modify, but they're still kept separate, i.e. modifications done by one of them don't affect the others. That's how you can crash one DOS box (overwriting DOS data area, or something like that), but the others keep running: the modifications. Hans-Bernhard Broeker (broeker AT physik DOT rwth-aachen DOT de) Even if all the snow were burnt, ashes would remain.