Live data from Hacker News

8086 Segmented Memory was a good idea

owl.billpg.com

31–40 of 150 posts

Re: 8086 Segmented Memory was a good idea

#31

I seem to recall at the time that flat memory was self evidently a better idea. It's not like people were sitting around going "gee I can't think of any better way to do memory addressing that this" until some genius suggests "how about flat?!?!?" Everyone knew flat was best but were stuck with 8086 crap.

-- Everyone knew flat was best but were stuck with 8086 crap.-- This! Thats one of the most interesting things to me: Actually very often in the IT-world, the worst competitor won the race while better solutions were known and available: Microsoft, Intel etc. Esp. that MS won for decades while making mainly a very bad OS, though they have some good enterprise products. How would the world look, if Unix/BSD would have…

I really wonder if Unix is best we can do. Or is it also worst? So in the end two of the worst options won. It did make sense back in time. But could it have been replaced with something better later?

Re: 8086 Segmented Memory was a good idea

#32

No No, it wasn't It's the "great idea" that sounds great 5 min in and horrible 10min afterwards You know, kinda like using null as a string end character But more importantly it kept the x86 world for too long in that dead end that was 8086 mode programming "Oh if developers would just..." They won't. They haven't. And they will not ever. In hindsight maybe a binary level translator from 8080 to 8086 would have worke…

Don't know why you're being voted down - you're correct - segmented memory was an awful nasty complex way to program and the industry was eager to see the backside of it.

Why would someone be popping up in 2026 saying it was awesome? Weird.

Re: 8086 Segmented Memory was a good idea

#33
post #31

Earlier quoted context omitted.

-- Everyone knew flat was best but were stuck with 8086 crap.-- This! Thats one of the most interesting things to me: Actually very often in the IT-world, the worst competitor won the race while better solutions were known and available: Microsoft, Intel etc. Esp. that MS won for decades while making mainly a very bad OS, though they have some good enterprise products. How would the world look, if Unix/BSD would have…

I really wonder if Unix is best we can do. Or is it also worst? So in the end two of the worst options won. It did make sense back in time. But could it have been replaced with something better later?

>> two of the worst options won

What do you mean, which are the two? Sure, Windows is crappy by Linus and MacOS? They are both awesome.

Re: 8086 Segmented Memory was a good idea

#36

I seem to recall at the time that flat memory was self evidently a better idea. It's not like people were sitting around going "gee I can't think of any better way to do memory addressing that this" until some genius suggests "how about flat?!?!?" Everyone knew flat was best but were stuck with 8086 crap.

Not entirely self-evidently. Position independent code was slower at the time and avoiding having to patching function addresses at load time is a net win.

More importantly, there’s backwards compatibility. By the time the 8086 came out, people had spent serious money on getting binary-only software (WordStar cost hundreds of dollars, for example). “Buy this computer, and you can keep running the software you paid for, but faster” was a good selling point.

Re: 8086 Segmented Memory was a good idea

#37
post #35

I had to use it to do image processing on a 256MB image buffer back in the 1980s in assembly language. It was absolutely hideous. Give me a flat 32 bit memory address space any day (e.g. MC68000 around the same time.)

> I had to use it to do image processing on a 256MB image buffer back in the 1980s in assembly language.... Give me a flat 32 bit memory address space any day (e.g. MC68000 around the same time.)

Huh?

There were no segmented x86 machines capable of addressing 256MB of RAM, aside from the 386 (maybe).

If you had a 386 and the $130K of memory your statement implies, you probably also could afford a Unix (or something else) license to get to that 32-bit address space. (If you weren't doing it all in memory, then you're having to depending on paging stuff out to disk, implying you either have a real OS or a flat memory model isn't enough to save you since you're manually having to page stuff to disk and back anyway.)

That's a super strange scenario you're describing.

Re: 8086 Segmented Memory was a good idea

#38
Author comes from some weird assumption that software is some annoying byproduct of making hardware, rather than a fact that the hardware is made to run software and making it easier is a goal.

It was just a hack. Hack to delay migration to 32 bit architecture. Effective one, but hack nonetheless

Re: 8086 Segmented Memory was a good idea

#39
post #27

Earlier quoted context omitted.

> we also need memory protection / isolation I seem to remember that memory segments came with a permission system (read-only, read/write, execute) in 'protected mode'. Probably only added in the 286 though (I was always more of an m68k guy at that time).

Maybe (I think it's possible in protected mode), but it still has an allocation problem, imagine there are programs A, B, C in the memory. Later, A and C are unloaded, leaving 2 free holes, totaling in 2MB. Now you want to load a 2MB program, but there is no unfragmented 2MB free block. The only solution I see, is to shift some loaded programs, which might be slow and even risky. Paging makes this problem much easier…

There is no such thing as a "2MB program".... all you have is a program composed of If you do need something approaching a 2MB block of memory, you don't need a contiguous range of memory, what you need is a contiguous range of selectors, which is a different (and probably easier) problem to solve.

Re: 8086 Segmented Memory was a good idea

#40
post #31

Earlier quoted context omitted.

-- Everyone knew flat was best but were stuck with 8086 crap.-- This! Thats one of the most interesting things to me: Actually very often in the IT-world, the worst competitor won the race while better solutions were known and available: Microsoft, Intel etc. Esp. that MS won for decades while making mainly a very bad OS, though they have some good enterprise products. How would the world look, if Unix/BSD would have…

I really wonder if Unix is best we can do. Or is it also worst? So in the end two of the worst options won. It did make sense back in time. But could it have been replaced with something better later?

Linux is only used as a kernel temporarily until GNU is finished.
Post reply on HN