Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!cs.utexas.edu!uunet!microsoft!kevinro From: kevinro@microsoft.UUCP (Kevin ROSS) Newsgroups: comp.os.os2 Subject: Re: overlays in 32-bit OS/2 Keywords: Virtual Memory 80386 Message-ID: <54465@microsoft.UUCP> Date: 4 May 90 21:03:33 GMT References: <1990Apr27.155908.4260@geac.com> <273@caslon.cs.arizona.edu> <4401@plains.UUCP> <11790@portia.Stanford.EDU> <4416@plains.UUCP> Reply-To: kevinro@microsoft.UUCP (Kevin ROSS) Organization: Microsoft Corp., Redmond WA Lines: 45 In article <4416@plains.UUCP> harlow@plains.UUCP (Jay B. Harlow) writes: |In article <11790@portia.Stanford.EDU| dhinds@portia.Stanford.EDU (David Hinds) writes: || Because of Microsoft's choice of the unsegmented memory model, it is ||not possible for the OS to distinguish between user code and user data, || || In my opinion, Microsoft made a mistake in adopting the flat model. ||The 80386 finally did segments right - to where they are useful and don't ||get in the way. Segments support many more access control possibilities ||than pages. It seems like a waste to ignore this functionality. |I aggree with David, if Microsoft chose to 'COMPLETELY' drop segments |(ie a FLAT memory model, NO SMALL, & NO SEGMENTS AT ALL) in |OS/2 2.0, It would be a waste/shame to bother with OS/2. Why is it a waste? The functionality of segments just makes the world a much more complicated place, not to mention slower. By dropping segments, we have accomplished 3 very important goals: 1) Done away with segment loads Segment loads while in protected mode are VERY expensive. It takes at least 22 clocks just to load a segment register. This has already proven to be a major speed win. 2) Code size is smaller By using a flat memory model, you can use any of the registers to address any location in user memory. You don't need segment overrides use es:si, or ds:bp. Compilers become much easier to write, and the list goes on. 3) Made OS/2 programs portable to other architectures Someday in the not to distant future, OS/2 will run on other hardware platforms. By not messing around with segments, the source code will be very portable to other architectures. About the only true gain of keeping 32-bit segments would be the ability to allocate more that 4 gigabytes of memory. If you are using that much memory, you surely won't want to run on a 386!