|
|
Log in / Subscribe / Register

The road to Zettalinux

The road to Zettalinux

Posted Sep 16, 2022 15:22 UTC (Fri) by linuxrocks123 (subscriber, #34648)
In reply to: The road to Zettalinux by atnot
Parent article: The road to Zettalinux

Is that a problem worth solving, though? Do we really want every pointer to be four times as big as it needs to be just so someone can mmap a whole hard drive? I don't think so.

"Four times as big" because x32 demonstrates that, if we try to squeeze, 32 bits is still enough for a userspace address space. The fact that x32 didn't take off demonstrates that it's not worth the effort to bother saving that memory, but I'd still rather not see us make pointers even fatter.


to post comments

The road to Zettalinux

Posted Sep 16, 2022 16:03 UTC (Fri) by epa (subscriber, #39769) [Link] (5 responses)

Perhaps 'near' and 'far' pointers will make a comeback?

The road to Zettalinux

Posted Sep 16, 2022 18:41 UTC (Fri) by Wol (subscriber, #4433) [Link] (4 responses)

Segmented memory? I was thinking that ...

Cheers,
Wol

The road to Zettalinux

Posted Sep 18, 2022 9:43 UTC (Sun) by jengelh (subscriber, #33263) [Link] (3 responses)

Segmented memory sucked. You had two 16-bit registers, but rather than allowing to reach 32 bits worth of address space, the x86 implementation of it only gave you 20 bits. What a waste. Wouldn't want to repeat that.

The road to Zettalinux

Posted Sep 18, 2022 10:45 UTC (Sun) by Wol (subscriber, #4433) [Link]

That was Intel. I used 50-series which also had segmented memory, and while I know far less about the silicon internals, I gather it worked very well.

It didn't migrate very well to Intel, and quite possibly because their segmentation was (compared to 50-series) broken.

I know it was used for security, for separating the OS from user-space, and from separating users/processes from each other.

Cheers,
Wol

The road to Zettalinux

Posted Sep 19, 2022 12:51 UTC (Mon) by eru (subscriber, #2753) [Link] (1 responses)

You are thinking of real-mode segmentation in 16-bit x86. In 386 and later protected mode, segments can be up to 4G, you have two additional segment registers (FS and GS), and addressing happens via a descriptor table, where you can set protections and the size of the segment, getting an exception if a pointer accesses outside it. I have worked with an inhouse OS that actually used these features.

The road to Zettalinux

Posted Nov 20, 2022 20:43 UTC (Sun) by nix (subscriber, #2304) [Link]

386 and later protected mode, segments can be up to 4G, you have two additional segment registers (FS and GS), and addressing happens via a descriptor table, where you can set protections and the size of the segment, getting an exception if a pointer accesses outside it. I have worked with an inhouse OS that actually used these features.
This was true on 386 and later in real mode too: you just had to set things up right in protected mode first (basically setting up the selector bounds right before transitioning back). Of course, this 'unreal mode' wasn't too useful, given that unless you were stuck in DOS you might as well just use protected mode, but it was there. There were really very few differences between real and protected mode on the 386: real mode was protected mode in a very, very thin disguise. You could use the full register file (%eax et al) and everything. Long mode on x86-64, now, *that's* different.


Copyright © 2026, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds