Re: Address bits again, Article on new mainframe use

Liste des GroupesRevenir à c arch 
Sujet : Re: Address bits again, Article on new mainframe use
De : anton (at) *nospam* mips.complang.tuwien.ac.at (Anton Ertl)
Groupes : comp.arch
Date : 13. Sep 2024, 09:13:16
Autres entêtes
Organisation : Institut fuer Computersprachen, Technische Universitaet Wien
Message-ID : <2024Sep13.101316@mips.complang.tuwien.ac.at>
References : 1 2 3 4 5
User-Agent : xrn 10.11
John Levine <johnl@taugh.com> writes:
According to Michael S  <already5chosen@yahoo.com>:
x86 Real mode segmentation is a hack to the address space. 80286
protected mode segmentation is something else. The only similarity
between the two is maximal size of segment is the same.
>
The 386 had 32 bit segments which should have made segmented code
practical and efficient and allowed giant programs with lots of
gigabyte segments. But Intel shot themselves in the foot. One problem
was that loading a segment register to switch segments remained
extremely slow so you still needed to write your program to avoid
doing so.

Yes, that was certainly a problem for those willing to use segments.
The question is if many people were willing.  My impression is that
people were not really willing to use them on the 80286, and 4GB
segments would not have changed that.

The other was that they mapped all the segments into a 32 bit linear
address space, and paged the linear address space.  That meant that
the total size of all active segments had to fit into 4GB, at which
point people said fine, whatever, set all the segment registers to
map a single 4GB segment onto the linear address space and used it as
a flat address machine.

That was not a problem while the 386 was current.  It could also only
deal with 4GB of physical RAM, and the 386 machines I had contact with
had at most 8MB of RAM; there were bigger systems around, but not
being able to use more then 4GB was not a problem at the time.  If the
reason for using segments would have been to be able to address more
memory, then going to 64 bits was certainly the better answer (and
that was taken eventually).

By contrast, if the reason for segments is that you want to use them
for memory safety, then two other properties of the 386 were not so
great:

* Only 8192 segments IIRC (hmm, what do the other 3 bits in a segment
  register do?); that was ok while memories were small, but if you
  want to have a segment for each C object, you quickly run out of
  segments with programs that, say, build trees using malloc()ed
  memory or such (even a tree with 8193 nodes would run out of
  segments).

* IIRC the segment size has a pretty large granularity (however,
  <https://en.wikipedia.org/wiki/X86_memory_segmentation#80286_protected_mode>
  says that the segments are limited to 16MB of size; maybe it was
  either the size limit or the large granularity), which is not so
  great.

I once read the "Intel 386 Microprocessor oral history panel : design
and development"
<https://www.computerhistory.org/collections/catalog/102702019>.  My
impression from reading that is that they actually wanted a flat
memory space, but were damned to do a followup for the 80286, so what
they did was something that allowed OS designers to provide a flat
address space, and also extended 80286 segments to 32 bits, without
too much implementation cost.  I think they did well.

Having a separate page table per segment as you suggest elsewhere
would have slowed down segments even more, for no gain in the 386's
day.  If more virtual memory per process was desired, a future
extension could have been to have a different way to construct the
linear address (e.g., using a larger segment descriptor that contains
a 52-bit base address or somesuch), and then use paging for the linear
address with PAE.  If segments had been embraced by software
developers, eventually one would have had something AMD64-like, with
segment descriptors with 64-bit base addresses and 64-bit limits, and
64-bit segment registers.

- anton
--
'Anyone trying for "industrial quality" ISA should avoid undefined behavior.'
  Mitch Alsup, <c17fcd89-f024-40e7-a594-88a85ac10d20o@googlegroups.com>

Date Sujet#  Auteur
14 Aug 24 * Article on new mainframe use132Stephen Fuld
14 Aug 24 +* Re: Article on new mainframe use124MitchAlsup1
15 Aug 24 i`* Re: Article on new mainframe use123George Neuner
15 Aug 24 i +- Re: Article on new mainframe use1Stephen Fuld
15 Aug 24 i `* Re: Article on new mainframe use121MitchAlsup1
15 Aug 24 i  +- Re: Article on new mainframe use1Stephen Fuld
15 Aug 24 i  +* Re: Article on new mainframe use118Niklas Holsti
16 Aug 24 i  i`* Re: Article on new mainframe use117Lawrence D'Oliveiro
16 Aug 24 i  i +* Re: COBOL, Article on new mainframe use30John Levine
17 Aug 24 i  i i+* Re: COBOL, Article on new mainframe use5Lawrence D'Oliveiro
17 Aug 24 i  i ii+- Re: COBOL, Article on new mainframe use1John Levine
17 Aug 24 i  i ii`* Re: COBOL, Article on new mainframe use3Keith Thompson
18 Aug 24 i  i ii `* Re: coroutines in COBOL, Article on new mainframe use2John Levine
18 Aug 24 i  i ii  `- Re: coroutines in COBOL, Article on new mainframe use1Lawrence D'Oliveiro
18 Aug 24 i  i i`* Re: COBOL, Article on new mainframe use24OrangeFish
18 Aug 24 i  i i +- Re: COBOL, Article on new mainframe use1John Levine
18 Aug 24 i  i i `* Re: COBOL, Article on new mainframe use22John Dallman
18 Aug 24 i  i i  +* Re: COBOL, Article on new mainframe use14MitchAlsup1
19 Aug 24 i  i i  i+- Re: COBOL, Article on new mainframe use1John Dallman
23 Aug 24 i  i i  i`* Re: COBOL, Article on new mainframe use12Terje Mathisen
23 Aug 24 i  i i  i `* Re: COBOL, Article on new mainframe use11Michael S
23 Aug 24 i  i i  i  `* Re: COBOL, Article on new mainframe use10Terje Mathisen
23 Aug 24 i  i i  i   `* Re: COBOL, Article on new mainframe use9Michael S
23 Aug 24 i  i i  i    +* Re: COBOL, Article on new mainframe use6John Levine
24 Aug 24 i  i i  i    i+- Re: COBOL, Article on new mainframe use1Lawrence D'Oliveiro
27 Aug 24 i  i i  i    i`* Re: COBOL, Article on new mainframe use4Keith Thompson
28 Aug 24 i  i i  i    i `* Re: COBOL, Article on new mainframe use3MitchAlsup1
28 Aug 24 i  i i  i    i  `* Re: COBOL, Article on new mainframe use2Keith Thompson
2 Sep 24 i  i i  i    i   `- Re: COBOL, Article on new mainframe use1Lawrence D'Oliveiro
24 Aug 24 i  i i  i    `* Re: COBOL, Article on new mainframe use2John Dallman
28 Aug 24 i  i i  i     `- Re: COBOL, Article on new mainframe use1Lawrence D'Oliveiro
19 Aug 24 i  i i  `* Re: COBOL, Article on new mainframe use7Lawrence D'Oliveiro
19 Aug 24 i  i i   `* Re: COBOL, Article on new mainframe use6John Levine
21 Aug 24 i  i i    `* Re: COBOL, Article on new mainframe use5Lawrence D'Oliveiro
21 Aug 24 i  i i     `* Re: COBOL, Article on new mainframe use4Keith Thompson
21 Aug 24 i  i i      `* Re: COBOL, Article on new mainframe use3MitchAlsup1
21 Aug 24 i  i i       +- Re: COBOL, Article on new mainframe use1Keith Thompson
2 Sep 24 i  i i       `- Re: COBOL, Article on new mainframe use1Tim Rentsch
16 Aug 24 i  i +* Re: Article on new mainframe use82George Neuner
22 Aug 24 i  i i`* Re: Article on new mainframe use81BGB
23 Aug 24 i  i i +- Re: Article on new mainframe use1Stephen Fuld
23 Aug 24 i  i i `* Re: Article on new mainframe use79Lawrence D'Oliveiro
23 Aug 24 i  i i  +* Re: Article on new mainframe use77BGB
23 Aug 24 i  i i  i+- Re: libraries, was Article on new mainframe use1John Levine
24 Aug 24 i  i i  i`* Re: Article on new mainframe use75Lawrence D'Oliveiro
24 Aug 24 i  i i  i +- Re: Article on new mainframe use1BGB
24 Aug 24 i  i i  i `* Re: Article on new mainframe use73John Levine
28 Aug 24 i  i i  i  +* Re: Article on new mainframe use70Lawrence D'Oliveiro
29 Aug 24 i  i i  i  i`* Re: Article on new mainframe use69John Levine
30 Aug 24 i  i i  i  i `* Re: Article on new mainframe use68Lawrence D'Oliveiro
30 Aug 24 i  i i  i  i  `* Re: Article on new mainframe use67Michael S
30 Aug 24 i  i i  i  i   +* Re: Article on new mainframe use12John Levine
30 Aug 24 i  i i  i  i   i`* Re: tiny COBOL, Article on new mainframe use11John Levine
31 Aug 24 i  i i  i  i   i +* Re: tiny COBOL, Article on new mainframe use8Stefan Monnier
31 Aug 24 i  i i  i  i   i i+* Re: tiny COBOL, Article on new mainframe use5Thomas Koenig
2 Sep 24 i  i i  i  i   i ii`* Re: tiny COBOL, Article on new mainframe use4Terje Mathisen
2 Sep 24 i  i i  i  i   i ii +* Re: tiny COBOL, Article on new mainframe use2Thomas Koenig
2 Sep 24 i  i i  i  i   i ii i`- Re: tiny COBOL, Article on new mainframe use1Anssi Saari
2 Sep 24 i  i i  i  i   i ii `- Re: tiny COBOL, Article on new mainframe use1Anton Ertl
31 Aug 24 i  i i  i  i   i i+- Re: tiny COBOL, Article on new mainframe use1Anton Ertl
31 Aug 24 i  i i  i  i   i i`- Re: tiny COBOL, Article on new mainframe use1George Neuner
2 Sep 24 i  i i  i  i   i `* Re: tiny COBOL, Article on new mainframe use2Lawrence D'Oliveiro
4 Sep 24 i  i i  i  i   i  `- Re: tiny COBOL, Article on new mainframe use1Lawrence D'Oliveiro
1 Sep 24 i  i i  i  i   +* Re: Article on new mainframe use6Lawrence D'Oliveiro
1 Sep 24 i  i i  i  i   i+* Re: COBOL history, Article on new mainframe use3John Levine
1 Sep 24 i  i i  i  i   ii+- Re: COBOL history, Article on new mainframe use1Lynn Wheeler
2 Sep 24 i  i i  i  i   ii`- Re: COBOL history, Article on new mainframe use1Lawrence D'Oliveiro
1 Sep 24 i  i i  i  i   i`* Re: Article on new mainframe use2John Dallman
2 Sep 24 i  i i  i  i   i `- Re: Article on new mainframe use1Lawrence D'Oliveiro
1 Sep 24 i  i i  i  i   `* Re: Article on new mainframe use48Lawrence D'Oliveiro
1 Sep 24 i  i i  i  i    `* Re: Article on new mainframe use47MitchAlsup1
2 Sep 24 i  i i  i  i     `* Re: Article on new mainframe use46Lawrence D'Oliveiro
2 Sep 24 i  i i  i  i      `* Re: Address bits again, Article on new mainframe use45John Levine
2 Sep 24 i  i i  i  i       +- Re: Address bits again, Article on new mainframe use1Thomas Koenig
2 Sep 24 i  i i  i  i       +- Re: Address bits again, Article on new mainframe use1Stephen Fuld
4 Sep 24 i  i i  i  i       `* Re: Address bits again, Article on new mainframe use42Lawrence D'Oliveiro
4 Sep 24 i  i i  i  i        +* Re: Address bits again, Article on new mainframe use2Terje Mathisen
4 Sep 24 i  i i  i  i        i`- Re: Address bits again, Article on new mainframe use1Lawrence D'Oliveiro
4 Sep 24 i  i i  i  i        `* Re: Address bits again, Article on new mainframe use39John Levine
4 Sep 24 i  i i  i  i         +* Re: Address bits again, Article on new mainframe use37John Dallman
4 Sep 24 i  i i  i  i         i+- Re: Address bits again, Article on new mainframe use1MitchAlsup1
5 Sep 24 i  i i  i  i         i+* transparent huge pages (was: Address bits again)4Anton Ertl
5 Sep 24 i  i i  i  i         ii+- Re: transparent huge pages1MitchAlsup1
5 Sep 24 i  i i  i  i         ii+- Re: transparent huge pages1Chris M. Thomasson
8 Sep 24 i  i i  i  i         ii`- Re: transparent huge pages (was: Address bits again)1Lawrence D'Oliveiro
5 Sep 24 i  i i  i  i         i`* Re: Address bits again, Article on new mainframe use31John Levine
8 Sep 24 i  i i  i  i         i `* Re: Address bits again, Article on new mainframe use30Lawrence D'Oliveiro
8 Sep 24 i  i i  i  i         i  `* Re: Address bits again, Article on new mainframe use29MitchAlsup1
8 Sep 24 i  i i  i  i         i   +* Re: Address bits again, Article on new mainframe use4MitchAlsup1
8 Sep 24 i  i i  i  i         i   i`* Re: Address bits again, Article on new mainframe use3Chris M. Thomasson
9 Sep 24 i  i i  i  i         i   i `* Re: Address bits again, Article on new mainframe use2Lawrence D'Oliveiro
9 Sep 24 i  i i  i  i         i   i  `- Re: Address bits again, Article on new mainframe use1Chris M. Thomasson
9 Sep 24 i  i i  i  i         i   `* Re: Address bits again, Article on new mainframe use24Lawrence D'Oliveiro
9 Sep 24 i  i i  i  i         i    `* Re: Address bits again, Article on new mainframe use23MitchAlsup1
10 Sep 24 i  i i  i  i         i     `* Re: Address bits again, Article on new mainframe use22Lawrence D'Oliveiro
11 Sep 24 i  i i  i  i         i      +* Re: Address bits again, Article on new mainframe use2John Levine
11 Sep 24 i  i i  i  i         i      i`- Re: Address bits again, Article on new mainframe use1Lawrence D'Oliveiro
11 Sep 24 i  i i  i  i         i      `* Re: Address bits again, Article on new mainframe use19MitchAlsup1
12 Sep 24 i  i i  i  i         i       `* Re: Address bits again, Article on new mainframe use18Lawrence D'Oliveiro
12 Sep 24 i  i i  i  i         i        `* Re: Address bits again, Article on new mainframe use17Lars Poulsen
12 Sep 24 i  i i  i  i         i         +* Re: Address bits again, Article on new mainframe use13Lawrence D'Oliveiro
13 Sep 24 i  i i  i  i         i         `* Re: Address bits again, Article on new mainframe use3George Neuner
4 Sep 24 i  i i  i  i         `- Re: Address bits again, Article on new mainframe use1Lawrence D'Oliveiro
28 Aug 24 i  i i  i  `* Re: Article on new mainframe use2Lawrence D'Oliveiro
23 Aug 24 i  i i  `- Re: Article on new mainframe use1George Neuner
16 Aug 24 i  i `* Re: Article on new mainframe use4Lynn Wheeler
15 Aug 24 i  `- Re: Article on new mainframe use1Thomas Koenig
15 Aug 24 `* Re: Article on new mainframe use7Lawrence D'Oliveiro

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal