Live data from Hacker News

80386 Protection

nand2mario.github.io

11–20 of 32 posts

Re: 80386 Protection

#11
post #8

I've wondered for a long time if we would have been able to make do without protected mode (or hardware protection in general) if user code was verified/compiled at load, e.g. the way the JVM or .NET do it...Could the shift on transistor budget have been used to offset any performance losses?

Microsoft Research had an experimental OS project at one point that does just that with everything running in ring 0 in the same address space: https://en.wikipedia.org/wiki/Singularity_(operating_system) Managed code, the properties of their C# derived programming language, static analysis and verification were used rather than hardware exception handling.

Fil-C vs CHERI vs SeL4 vs YOLO

I think hardware protection is usually easier to sell but it isn't when it is slower or more expensive than the alternative.

Re: 80386 Protection

#13
> These features made possible Windows 3.0, OS/2, and early Linux.

And also--before Linux--SCO Xenix and then SCO Unix. It was finally possible to run a real Unix on a desktop or home PC. A real game changer. I paid big $$$ (for me at the time) to get SCO Xenix for my 386 so I could have my own Unix system.

Re: 80386 Protection

#14
post #8

I've wondered for a long time if we would have been able to make do without protected mode (or hardware protection in general) if user code was verified/compiled at load, e.g. the way the JVM or .NET do it...Could the shift on transistor budget have been used to offset any performance losses?

I think the interesting thing about having protection in software is you can do things differently, and possibly better. Computers of yesteryear had protection at the individual object level (eg https://en.wikipedia.org/wiki/Burroughs_Large_Systems). This was too expensive to do in 1970s hardware and so performance sucked. Maybe it could be done in software better with more modern optimizing compilers and perhaps a few bits of hardware acceleration here and there? There's definitely an interesting research project to be done.

Re: 80386 Protection

#15
post #8

I've wondered for a long time if we would have been able to make do without protected mode (or hardware protection in general) if user code was verified/compiled at load, e.g. the way the JVM or .NET do it...Could the shift on transistor budget have been used to offset any performance losses?

https://www.destroyallsoftware.com/talks/the-birth-and-death...

Re: 80386 Protection

#16
post #9
post #4

Earlier quoted context omitted.

Pretty sure Enhanced Mode, that only came later in Windows 3.11 for Workgroup, is the one that supported the flat addressing mode.

Enhanced mode was already in 3.0 (and I think allowed for flat addressing) However, Win32s was introduced in 3.11 which a subset of the Windows 32-bit API from NT. 3.11 also introduced 32-bit disk access and 32-bit drivers. Microsoft did 32-bit in steps -- it was confusing already back then.

> 3.11 also introduced 32-bit disk access and 32-bit drivers.

IIRC a lot of it wasn't turned on by default due to hardware/driver compatability concerns, and there were articles all over the place about how to turn it on for extra performance. Essentially they used optimising tech-heads the world over as a giant beta-test group for parts of Win95's IO subsystem.

Re: 80386 Protection

#17

Earlier quoted context omitted.

Microsoft Research had an experimental OS project at one point that does just that with everything running in ring 0 in the same address space: https://en.wikipedia.org/wiki/Singularity_(operating_system) Managed code, the properties of their C# derived programming language, static analysis and verification were used rather than hardware exception handling.

Fil-C vs CHERI vs SeL4 vs YOLO I think hardware protection is usually easier to sell but it isn't when it is slower or more expensive than the alternative.

"Operating System Principles" (1973) by Per Brinch Hansen. A full microkernel OS (remake of RC-4000 from 1967) written in a concurrent dialect of Pascal, that also manages to make do without hardware protection support.

Re: 80386 Protection

#18
post #8

I've wondered for a long time if we would have been able to make do without protected mode (or hardware protection in general) if user code was verified/compiled at load, e.g. the way the JVM or .NET do it...Could the shift on transistor budget have been used to offset any performance losses?

Microsoft Research had an experimental OS project at one point that does just that with everything running in ring 0 in the same address space: https://en.wikipedia.org/wiki/Singularity_(operating_system) Managed code, the properties of their C# derived programming language, static analysis and verification were used rather than hardware exception handling.

I think TempleOS also worked like this, though its certainly better known for its "other" features.

edit: I missed it was linked on the above page

Re: 80386 Protection

#19

> These features made possible Windows 3.0, OS/2, and early Linux. And also--before Linux--SCO Xenix and then SCO Unix. It was finally possible to run a real Unix on a desktop or home PC. A real game changer. I paid big $$$ (for me at the time) to get SCO Xenix for my 386 so I could have my own Unix system.

Xenix 2.1 could run on the IBM PC XT with Intel 8088 in late 1983, IIRC, and even before that on the Altos 586 which had MMU as an external chip.

Re: 80386 Protection

#20
post #14
post #8

I've wondered for a long time if we would have been able to make do without protected mode (or hardware protection in general) if user code was verified/compiled at load, e.g. the way the JVM or .NET do it...Could the shift on transistor budget have been used to offset any performance losses?

I think the interesting thing about having protection in software is you can do things differently, and possibly better. Computers of yesteryear had protection at the individual object level (eg https://en.wikipedia.org/wiki/Burroughs_Large_Systems ). This was too expensive to do in 1970s hardware and so performance sucked. Maybe it could be done in software better with more modern optimizing compilers and perhaps a…

Sadly, even software-filled TLBs look to be a thing of the past. Apparently a hardware page-table walker is just that much faster? I’m not sure.
Post reply on HN