Hacker News new | ask | show | jobs
by gpderetta 1975 days ago
Being fast is hardly a marketing feature. X86 had gates, segment tables and rings (still fully functional in 32 bit mode, so having them is not an hindrance on being fast). They got dropped in 64 bit mode because no software has used them in 25 years.
2 comments

Having them wasn't a hindrance, luckily for intel. But using them to the full extent was far slower than not. E.g. call gates as a syscall mechanism have a far higher overhead compared to int80. Segments, when used in the intended finer-than-page granularity are also too slow, because changing a segment register often is very costly in terms of cache and TLB flush. That's why everyone just used a few fixed segments that almost never changed and did the interesting stuff with page-based memory management.
> They got dropped in 64 bit mode because no software has used them in 25 years.

I think there was one that used them, but i can't remember its name. Maybe someone here can help.

It was obscure enough that Intel didn't think too much about removing them.

IIRC Segments were used to speed up (para?) virtualization, before built-in support in the ISA.

Segment registers are also used as thread pointer, but that special case is still supported even in 64 bit mode.

I was talking about the rings. I remember something that used them.
I think NT at some point run drvers and some other subsystems in lesser privileged rings than ring 0. Not sure if this was dropped in later versions.
IIRC, NT 4 moved drivers into kernel space for performance. The result was that the system crashed much faster :-P.