Вход на сайт

Просмотр новости

Найдите то, что Вас интересует

Comment on He Comes to Bury Segmented Memory, Not to Praise It by Nik

Дата публикации: 06-07-2026 18:52:52

In reply to <a href="https://hackaday.com/2026/07/06/he-comes-to-bury-segmented-memory-not-to-praise-it/#comment-8317178">Mark Morgan Lloyd</a>.
Once Protected Mode was available in 386, the segmentation was left unused as all major OSes relied on linear addressing. Also, linear addresses are used in other architectures (m68k, MIPS, SPARC, PowerPC, ARM) and OS developers decided to have single unified code that relied on this feature.
If someone remembers an x86 protected-mode OS that actually used segmented addresses for something, please chime in.

Основное содержимое страницы с новостью.

[BillPg] has been designing a fantasy 1980s-era home computer. As part of the exercise, he’s reevaluating all the assumptions that have grown organically over time in the small computer landscape. Hindsight is, so they say, 20/20, but sometimes hindsight can also be colored by modern thinking. Sometimes an idea that seems stupid today made sense in the context of its time. In particular, [Bill] has thoughts on the much-maligned 8086 memory segments.

If you haven’t run into it before, the 8086/8088 had a problem. It wanted to be more or less conceptually software compatible with the 8080 and Z80 computers, which had 16-bit addresses, leading to a limit of 64K of memory. When Intel was designing the next generation of chips, it knew that 64K had to go, but telling developers that code would require huge reengineering was a non-starter. So the idea was to provide multiple 64K spaces broken up into segments.

As with most things, there is theory, and there is practice. In theory, a 16-bit segment provided four extra address bits to add to the existing 16-bit address, producing a 32-bit address, even though the CPU only had 20 bits of address bus. Code that fit in 64K could pretend like that was the whole world, and a tricked-out system could have 16 worlds. Future systems could, in theory, have had more.

In practice, Intel made the segment the top 16 bits of a 32-bit address and then added it to the ordinary 16-bit address. So address 0000:0010 (segment=0, address=10 hex) is the same memory location as 0001:0000. Address 0010:0010 is the same as address 0000:0110 and 0001:0100. This wasn’t really the intent, just a byproduct of how the chip worked.

Eventually, the segments would become indices into a table (like the title graphic), but by then, bad practices wiped out a good idea. It is doubtful that the original designers thought anyone would take advantage of the overlapping address, but, of course, they did.

By the time the 80286 and beyond produced segments that were really keys which defined a block of memory, everyone was already in the mode of using the segment and offset as a large pointer. C compilers even had “modes” that let you treat the segment as just more address bits. Because of that, even on newer processors, people had a tendency to build a “flat” segment and use it. That is, make a segment that starts at 0, ends at the end of memory, and then forget about segments.

In fact, many people independently discovered that you could define a flat segment in protected mode, return to real mode, and then enjoy a flat address space. This was later christened unreal mode, and a topic we’ve covered a few times before.

We agree with [Bill]. Segments were a good idea at the time and might have been more important if people had used them the “right” way. Of course, there would have been ups and downs. Proper segments might have allowed for easy virtual memory, for example. But at the price of possibly swapping in and out huge segments instead of relatively small pages. Today, most of what segments were supposed to do is part of the memory management unit and is mostly hidden from the application developer. Still, interesting to reflect on why Intel made that choice and how we got to where we are today.

Схожие новости

#Наименование новостиТональностьИнформативностьДата публикации
1Retro-Projekt: Entwickler bringt Linux auf 34 Jahre altes Sega Megadrive0505-07-2026
2Reserved THP Feature Proposed For Linux To Combine The Best Of HugeTLB & THP0727-06-2026
3Линукс на Intel 40040523-06-2026
4More AMD Zen 6 Prepping, Many ASUS / Lenovo / HP Laptop Improvements For Linux 7.20526-06-2026
5Re: Установка win 3.1 на qemu0527-06-2026
6Будущее Linux ОС-2614-04-2026
7Анатомия процесса загрузки Linux — от инициализации ядра до systemd0524-06-2026
8Из ядра Linux выпилили strncpy: шесть лет, 362 коммита, одна функция0823-06-2026
9SafeStreets, an update: a new scoring model and how it reads OSM now0724-06-2026

Классификация: Информация. Схожих патентов: 0. Схожих новостей: 9. Тональность: 0. Информативность: 7. Источник: hackaday.com.