CraigAB69 wrote on 2022-06-30, 22:58:
For example, I am interested in how DOS/Win 3.x processes and memory work. There are so many companies that made commercial products, that it would be silly of me to think I can do better.
Hi! It depends in parts on the kernal types.
Real and Standard-Mode kernal use 64KB chunks, because that was the segment size of the 8086.
80286 was more flexible, technically, but that feature wasn't used.
The 386 Enhanced-Mode kernal uses 4K chunks, but normal Win16 programs don't realize this. It happens transparently.
Then, each kernal has different sources for memory.
Real-Mode uses Conventional Memory and EMS (64KB and 256KB frame size), which Windows programs can fully use (unlike on Windows 2.0).
Standard-Mode uses XMS to access Extended Memory, but actual memory management is done by Windows itself. There's some VCPI 1.0 compatibility, too.
Technically, there are two Standard-Modes on Windows 3.1.
One is handled by DOSX and KRNL286, the other one is part of KRNL386.
The first one is executed on 286 PCs automatically, the second one on 386 and higher.
KRNL386 provides it by disabling VXD support and not using Virtual Memory.
386 Enhanced Mode uses XMS to access Extended Memory, but can also provide DPMI memory.
Now, on Windows 3.1 on OS/2 2.11 or Warp 3 (Win-OS/2),
Windows became a DPMI client.
Instead of using XMS, it was getting DPMI memory from OS/2.
Some documents about memory management I found can be found here:
Re: Viewing the Upper Memory area
And here's some description of Windows 2.x compatibility bits.
Re: Wine on newer windows OSes?
Of course, there's much much more.
The books of Charles Petzold and others may have more information.
"Time, it seems, doesn't flow. For some it's fast, for some it's slow.
In what to one race is no time at all, another race can rise and fall..." - The Minstrel
//My video channel//