3 ms·
This is a bit of history, I had to search a while for: "The designers of the 80286 based it on the Multics segmentation model, but in reality segmentation make
by ForOldHack 4y ago
This is a bit of history, I had to search a while for:
"The designers of the 80286 based it on the Multics segmentation model, but in reality segmentation makes it really hard to implement, because of internal memory fragmentation. A while back I wrote blog post about how an alternative 80286 with segment registers pointing to 256 byte paragraphs giving a true 24-bit virtual address which was then paged into a 24-bit physical address space. 8068 compatibility could then be managed by having the segment registers map to 16 byte paragraphs as before."
But: The screwed up on the switch back to real mode, and on the reservation of the 4th byte of the descriptor tables, which made it so that Xenix-286 cannot run on a 386. ( long discussion... I think that MS purposefully made it incompatible. )
- klelatti 4y agoBrilliant! Thanks so much.
- lproven 4y agoSegmentation is harder to work with, but it has benefits too. At the time, when it was all new, everyone just complained about it: they wanted the ease of use of flat, unsegmented memory, with just one memory address. More recently, the NX bit has become desirable and promoted. The CPU can flag areas of RAM as data, and mark them as Non eXecutable. That is all: one bit, so either it is code and you can run it, or it's data and you can't. But the original Intel 386 design had 4 protection rings: 0, 1, 2 and 3. 0: kernel mode, can do anything. 1: inner ring, privileged code, but with restrictions. 2: outer ring, some hardware privileges: can do device I/O. 3: user mode code, no hardware access privileges, has to request everything through the kernel. OS/2 2+ used the middle rings, and Novell Netware 4.x, optionally, for NLMs (apps that ran on the server, which was rare for Netware). Nothing much else. Microsoft only ever used 0 and 3. But with memory segments, you could, in theory, flag each segment by ring. This is much more flexible and controllable than just one NX bit. I've written about this: https://www.theregister.com/Print/2011/07/11/a_brief_history_of_virtualisation_part_one/ https://www.theregister.com/Print/2011/07/11/a_brief_history... Segmentation had benefits, but they took more work, more effort and thought and planning. You needed to design the OS for it, and the drivers, and the apps. But remember how DOS evolved: it's a clone of CP/M. No multitasking, no permissions, only 1 app in memory at a time. Back in the 1980s, the industry was growing by adding stuff onto a brain-dead, super-simple design from the 1970s. They saw segments as a hindrance, an unnecessary complexity. They wanted them to go away. In the 1990s, we got 32-bit desktop personal computers and 32-bit end-user desktop OSes. Apple's design was a single-tasking OS and it had to buy a Unix vendor to make a grown up OS. Microsoft's engineers achieved miracles bolted on to DOS, but in the end, it had to ditch its entire OS too, and build a whole new one: Windows NT. It took headhunted talent to make it work. IBM dropped the ball, which is the whole point of my blog post that is the root of this discussion. Now, we have CHERI, building protection segments back in again. I've written about that too: https://www.theregister.com/2022/07/26/cheri_computer_runs_kde/ https://www.theregister.com/2022/07/26/cheri_computer_runs_k... It's a huge waste of human effort: we had them in the 1980s, but they were too hard and we threw them away. UNIX did too. Multics used them, but Multics was too hard. UNIX was Multics with the hard bits left out. And now, 50 years later, we're discovering that we needed them all along and we're painfully and with great difficulty putting them back in again.
- ForOldHack 4y agoExcellent. This is either extremely well researched, or you where there, like I was. Thanks.
- lproven 4y agoThank you! Yes, I was there. Got into the biz in 1988, but was a hobbyist before then.
- hilbert42 4y agoExcellent concise summary, glad you and ForOldHack beat me to it. I would have confined my reply to the ring issue having forgotten much of the controversy with other OSes—Netware for instance (even though I'd used it many times). You're right about segmentation being hard work, I can recall cursing Intel at the time and hoping it would bring out a more eloquent processor that was easier to use such as Moto's 68000. However, there wasn't any thought of moving over to Moto because of existing investment in Intel's development systems-Multibus, and in the 8085 and 8051, they were still current and we were still using them. "It's a huge waste of human effort:" Absolutely, if I could have that time over I reckon I'd opt for a different profession. Everyone from manufacturers to end users wasted a huge amount of time and energy that resulted from stupid mistakes to outright shenanigans. We saw it all happen from a developer/end user's perspective and we weren't immune either (also it ended up costing everyone unnecessary money). For me, the most bitter arguments were over the change from IBM to Microsoft which also included the shift from OS/2 to Windows. Technical arguments became irrelevant after senior management read press reports that Microsoft was the new 'in fashion' company when it came to computing. I recall saying to management "why waste all the expense on an engineering outfit when you can simply find solutions in the finance section of the newspaper". That didn't win me any Brownie points. Why so many in computing and tech became so besotted with Gates and Microsoft and why more level heads never prevailed at the time has always troubled me. For instance, when Gates was quoted as saying "640K ought to be enough for anyone" I recall saying to colleagues who agreed with me "either Gates is daft or he's been forced to read from a PR release". Whilst there's now doubt that he ever said those words there was never any outright denial at the time. Similarly, the technical press never went out of its way to say how stupid the notion was. Being obviously silly or at best ill considered then why didn't the press say so? There's shades of 'the emperor's new clothes' here, methinks—and that's troubling. I'm of the opinion that long after all protagonists of that era are dead and buried that researchers will tally up the actual cost of that wasted human effort and we'll find that whilst Microsoft wasn't completely responsible it nevertheless played an overly dominant role. The same applies with Windows and MS's deviations from the original CUA (which are still ongoing). Just think of the millions of hours lost worldwide by users having to relearn and futz with the UI whenever MS changes it. If dollar figures were put on this wasted human effort then they'd have to be staggering.