• Re: tiny COBOL, Article on new mainframe use

    From John Levine@21:1/5 to All on Fri Aug 30 21:55:46 2024
    According to Scott Lurndal <slp53@pacbell.net>:
    lines. There was even COBOL for the 1401 which is pretty amazing considering how tiny
    a 1401 was and it ran in 4000 characters of core. You needed tapes or a disk but even so.

    I still have a copy of the Nevada COBOL compiler for the Commodore 64.

    The C64 was a supercomputer compared to a 1401. A 1401 had 4000 to
    16000 six-bit characters of core, and the optional disk packs were 2
    million characters or in the ballpark of 1.3 megabytes.

    A C64 had 64K 8-bit bytes of RAM, and the floppies held about 1.2MB but they were a
    whole lot cheaper than 1311 disk packs.

    --
    Regards,
    John Levine, johnl@taugh.com, Primary Perpetrator of "The Internet for Dummies",
    Please consider the environment before reading this e-mail. https://jl.ly

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Stefan Monnier@21:1/5 to All on Fri Aug 30 18:04:07 2024
    A C64 had 64K 8-bit bytes of RAM,

    Indeed (tho, IIRC 8kB of those were hidden by the ROM, tho you could
    change the mapping to hide different 8kB at different time and thus
    access the full 64kB of RAM).

    and the floppies held about 1.2MB but they were a
    whole lot cheaper than 1311 disk packs.

    IIRC they held only ~170kB.
    1MB floppies arrived later (in the days of 3˝" floppies, IIRC).


    Stefan

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Thomas Koenig@21:1/5 to Stefan Monnier on Sat Aug 31 08:39:50 2024
    Stefan Monnier <monnier@iro.umontreal.ca> schrieb:
    A C64 had 64K 8-bit bytes of RAM,

    Indeed (tho, IIRC 8kB of those were hidden by the ROM, tho you could
    change the mapping to hide different 8kB at different time and thus
    access the full 64kB of RAM).

    For doing highly useful things like changing the name of the BASIC
    commands: It was possible to PEEK from the ROM and POKE to
    the underlying RAM.


    and the floppies held about 1.2MB but they were a
    whole lot cheaper than 1311 disk packs.

    IIRC they held only ~170kB.

    And were extremely slow - around 300 bytes per second, comparable
    to a card reader. But fast loaders could improve on that up to 10 kB/s.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Anton Ertl@21:1/5 to Stefan Monnier on Sat Aug 31 17:29:57 2024
    Stefan Monnier <monnier@iro.umontreal.ca> writes:
    A C64 had 64K 8-bit bytes of RAM,

    Indeed (tho, IIRC 8kB of those were hidden by the ROM, tho you could
    change the mapping to hide different 8kB at different time and thus
    access the full 64kB of RAM).

    Actually, the C64 has 8+8KB of ROM (at $a000-$bfff and at
    $e000-$ffff), and I/O at $D000-$DFFF and at $0-$1 that hide the RAM in
    the default configuration. You could configure the "MMU" to make all
    RAM except the two locations at $0-$1 readable and writeable for the
    CPU, but of course then you would have to bank-switch to access the
    I/O or the OS (in the ROM at $e000-$ffff), so the common setup even if
    BASIC was not needed was to have the I/O and the OS ROM visible, and
    48KB of contiguous RAM readable and writable.

    and the floppies held about 1.2MB but they were a
    whole lot cheaper than 1311 disk packs.

    IIRC they held only ~170kB.

    Yes, the 1541 gave us 170KB at a time. Much later there was also the
    1571, which was double-sided and thus doubled the capacity, and even
    later the 1581 which gave 790KB of storage. I stuck with the 1541,
    for which I have an accelerator add-on.

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

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From George Neuner@21:1/5 to monnier@iro.umontreal.ca on Sat Aug 31 17:18:08 2024
    On Fri, 30 Aug 2024 18:04:07 -0400, Stefan Monnier
    <monnier@iro.umontreal.ca> wrote:

    A C64 had 64K 8-bit bytes of RAM,

    Indeed (tho, IIRC 8kB of those were hidden by the ROM, tho you could
    change the mapping to hide different 8kB at different time and thus
    access the full 64kB of RAM).

    and the floppies held about 1.2MB but they were a
    whole lot cheaper than 1311 disk packs.

    IIRC they held only ~170kB.
    1MB floppies arrived later (in the days of 3½" floppies, IIRC).


    Stefan


    Circa ~1983, I saw a pair of CBM-IIs with 80-column displays and dual
    500KB 5.25in drives. They were being used by a law office for word
    processing and some kind of database application.

    Don't recall much about them ... it was one of my first encounters
    with "micro" computers, and I wasn't allowed to touch anything.

    By 1985 that same office had converted to IBM PCs.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From John Levine@21:1/5 to All on Sat Aug 31 23:43:48 2024
    According to Lawrence D'Oliveiro <ldo@nz.invalid>:
    On Fri, 30 Aug 2024 18:37:42 +0300, Michael S wrote:

    It would not surprise me if COBOL compiler was implemented and tested on
    7080 then, while still on 7080, ported to emulated 705 and then sold to
    users of real 705.

    As I recall, IBM wasn’t part of CODASYL, and had no part in COBOL >development.

    Um, if you spent ten seconds looking at the 1960 COBOL report, you would have found IBM
    listed as one of the contributors, and it specifically lists the IBM Commercial Translator
    as one of thte sources for COBOL.

    So it had the usual “NIH” attitude and was trying to push
    PL/I as its all-singing, all-dancing language for both business and >scientific use, for some time.

    Um, if you spent another ten seconds looking at the 1964 NPL report (I hope you know what that
    was), it would be glaringly obvious that the numbered data structures and picture data
    come directly from COBOL. Because they knew that's what their commercial customers
    wanted. To avoid confusion, 1964 was four years after 1960.

    Eventually, of course, customers forced it to relent and offer COBOL.

    That might take two or three minutes to check that IBM offered COBOL on their 7000 machines years before they had PL/I on the 360. And of course, they had COBOL and Fortran on the 360 at the same time.
    --
    Regards,
    John Levine, johnl@taugh.com, Primary Perpetrator of "The Internet for Dummies",
    Please consider the environment before reading this e-mail. https://jl.ly

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Lynn Wheeler@21:1/5 to John Levine on Sat Aug 31 23:38:38 2024
    John Levine <johnl@taugh.com> writes:
    Um, if you spent ten seconds looking at the 1960 COBOL report, you
    would have found IBM listed as one of the contributors, and it
    specifically lists the IBM Commercial Translator as one of thte
    sources for COBOL.

    Bob Bemer
    https://history.computer.org/pioneers/bemer.htm
    Bemer is the inventor of the words "Cobol," and "CODASYL," six ASCII characters, and the concepts of registry and escape sequences in
    character codes. He also invented the term and defined the nature of the "software factory." At IBM he developed the first load-and-go system
    (PRINT I) and also was responsible for the implementation of the
    programming system FORTRANSIT, which provided a quick first compiler for
    the IBM 650 computer, and was the first programming language to run both decimal (IBM 650) and binary (IBM 704) computers. For the support of
    commercial programming Bemer developed PRINT I; in the late 1950s he
    developed XTRAN, a step towards Algol, and "Commercial Translator,"
    which became a significant input to Cobol. His major Cobol innovations
    were the IDENTIFICATION and ENVIRONMENT divisions, and the PICTURE
    clause.

    web bages gone 404, but lives on at wayback machine https://web.archive.org/web/20180402200149/http://www.bobbemer.com/HISTORY.HTM

    Bemer wiki
    https://en.wikipedia.org/wiki/Bob_Bemer
    He served on the committee which amalgamated the design for his COMTRAN language with Grace Hopper's FLOW-MATIC and thus produced the
    specifications for COBOL. He also served, with Hugh McGregor Ross and
    others, on the separate committee which defined the ASCII character
    codeset in 1960, contributing several characters which were not formerly
    used by computers including the escape (ESC), backslash (\), and curly
    brackets ({}).[3] As a result, he is sometimes known as The Father of
    ASCII.[1]

    COMTRAN wiki
    https://en.wikipedia.org/wiki/COMTRAN
    COMTRAN (COMmercial TRANslator) is an early programming language
    developed at IBM. It was intended as the business programming equivalent
    of the scientific programming language FORTRAN (FORmula TRANslator). It
    served as one of the forerunners to the COBOL language. Developed by Bob
    Bemer, in 1957, the language was the first to feature the programming
    language element known as a picture clause.

    COMTRAN manual https://bitsavers.org/pdf/ibm/7090/F28-8043_CommercialTranslatorGenInfMan_Ju60.pdf

    Bob Bemer papers
    https://oac.cdlib.org/findaid/ark:/13030/c8j96cf7/
    He later played a key role in the development of the COBOL programming language, which drew on aspects of Bemer's COMTRAN programming language developed at IBM. Bemer is credited with the first public identification
    of the Y2K problem, publishing in 1971 his concern that the standard representation of the year in calendar dates within computer programs by
    the last two digits rather than the full four digits would cause serious
    errors in confusing the year 2000 with the year 1900.

    --
    virtualization experience starting Jan1968, online at home since Mar1970

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Lawrence D'Oliveiro@21:1/5 to John Levine on Mon Sep 2 03:23:52 2024
    On Fri, 30 Aug 2024 21:55:46 -0000 (UTC), John Levine wrote:

    I still have a copy of the Nevada COBOL compiler for the Commodore 64.

    The C64 was a supercomputer compared to a 1401.

    I don’t think it was possible to fit a COBOL compiler into a 64K address space -- not without heavy overlaying. The DEC one for the PDP-11 was a
    280kiB executable. It was so resource-heavy, it was kept chained up in its
    own special batch queue, so nobody could run more than one instance at
    once.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Lawrence D'Oliveiro@21:1/5 to John Levine on Mon Sep 2 03:19:51 2024
    On Sat, 31 Aug 2024 23:43:48 -0000 (UTC), John Levine wrote:

    Um, if you spent ten seconds looking at the 1960 COBOL report, you would
    have found IBM listed as one of the contributors, and it specifically
    lists the IBM Commercial Translator as one of thte sources for COBOL.

    Yeah, I rechecked my copy of Sammet, and IBM did indeed have someone in
    CODASYL working on COBOL.

    But they were not among the first to implement the original 1960 spec:
    that was left to Remington Rand and RCA.

    Um, if you spent another ten seconds looking at the 1964 NPL report
    ... it would be glaringly obvious that the numbered data structures
    and picture data come directly from COBOL.

    Of course. They were trying to offer an alternative to COBOL, weren’t
    they? And were less than successful at that.

    I was going to ask “Why level numbers? Didn’t they know about how structures were done in Algol W?”. But it turns out Algol W didn’t come
    out until 1965.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Terje Mathisen@21:1/5 to Thomas Koenig on Mon Sep 2 10:10:58 2024
    Thomas Koenig wrote:
    Stefan Monnier <monnier@iro.umontreal.ca> schrieb:
    A C64 had 64K 8-bit bytes of RAM,

    Indeed (tho, IIRC 8kB of those were hidden by the ROM, tho you could
    change the mapping to hide different 8kB at different time and thus
    access the full 64kB of RAM).

    For doing highly useful things like changing the name of the BASIC
    commands: It was possible to PEEK from the ROM and POKE to
    the underlying RAM.


    and the floppies held about 1.2MB but they were a
    whole lot cheaper than 1311 disk packs.

    IIRC they held only ~170kB.

    And were extremely slow - around 300 bytes per second, comparable
    to a card reader. But fast loaders could improve on that up to 10 kB/s.

    They did that by reading every 1/2 sector, then reassembling after 2
    rotations, instead of having to wait a full rotation between every
    sector read?

    Terje

    --
    - <Terje.Mathisen at tmsw.no>
    "almost all programming can be viewed as an exercise in caching"

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From John Levine@21:1/5 to All on Mon Sep 2 10:11:48 2024
    According to Lawrence D'Oliveiro <ldo@nz.invalid>:
    On Sun, 1 Sep 2024 00:52:34 +0000, MitchAlsup1 wrote:

    Imagine trying to fit LLVM or GCC into a PDP/11 address space.

    Pretty much from the moment the PDP-11 range was introduced, it was
    obvious the 16-bit address space was going to be a significant limitation.

    I dunno, when I first programmed a PDP-11 in 1970, 64K seemed like a
    lot. The machine I used had as I recall 8K bytes (which they called 4K
    words) which was plenty for what I was doing.

    It is true that the -11 died for lack of address space, but nobody I
    know has ever come up with a good design where the address size is
    bigger than the word size. You end up with segments as on the 286
    or bank switching which is what later -11's did.

    VAX stood for Virtual Address Extension. The key improvement was the
    32 bit addresses. Everything else was a detail. Some of those details
    were unfortunate but that's a different argument.

    Also don't forget that back in that era everyone who had disks used
    overlays. The IBM mainframe linkers had complicated ways to build
    overlays and squeeze programs into 64K or whatever. Even though the
    address space was 16MB it was a long time before machines had that much
    RAM and by then they'd added paging to make the physical memory size less relevant.

    --
    Regards,
    John Levine, johnl@taugh.com, Primary Perpetrator of "The Internet for Dummies",
    Please consider the environment before reading this e-mail. https://jl.ly

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Thomas Koenig@21:1/5 to Terje Mathisen on Mon Sep 2 09:16:42 2024
    Terje Mathisen <terje.mathisen@tmsw.no> schrieb:
    Thomas Koenig wrote:
    Stefan Monnier <monnier@iro.umontreal.ca> schrieb:
    A C64 had 64K 8-bit bytes of RAM,

    Indeed (tho, IIRC 8kB of those were hidden by the ROM, tho you could
    change the mapping to hide different 8kB at different time and thus
    access the full 64kB of RAM).

    For doing highly useful things like changing the name of the BASIC
    commands: It was possible to PEEK from the ROM and POKE to
    the underlying RAM.


    and the floppies held about 1.2MB but they were a
    whole lot cheaper than 1311 disk packs.

    IIRC they held only ~170kB.

    And were extremely slow - around 300 bytes per second, comparable
    to a card reader. But fast loaders could improve on that up to 10 kB/s.

    They did that by reading every 1/2 sector, then reassembling after 2 rotations, instead of having to wait a full rotation between every
    sector read?

    Just reading up on this... it seems that there was a bug in the
    6522 I/O controller where the shift register sometimes dropped
    a bit due to a race condition, and the workaround which was
    hastily put in place was very slow.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Thomas Koenig@21:1/5 to John Levine on Mon Sep 2 10:46:36 2024
    John Levine <johnl@taugh.com> schrieb:

    It is true that the -11 died for lack of address space, but nobody I
    know has ever come up with a good design where the address size is
    bigger than the word size. You end up with segments as on the 286
    or bank switching which is what later -11's did.

    What about the 6502? That was very much a 8-bit CPU, but
    cleverly used its zero page as index registers. Or all the other
    8-bit CPUs, which usually had 16-bit address registers.

    People could have built CPUs with 16-bit accumulators and 32-bit
    addresses (or 8-bit accumulators and 32-bit addresses). It is
    debatable if these would have counted as a good design, though.

    VAX stood for Virtual Address Extension. The key improvement was the
    32 bit addresses. Everything else was a detail. Some of those details
    were unfortunate but that's a different argument.

    Also don't forget that back in that era everyone who had disks used
    overlays. The IBM mainframe linkers had complicated ways to build
    overlays and squeeze programs into 64K or whatever.

    Overuse of overlays almost sank OS/360. Brooks recounts that,
    on a high-end machine, the FORTRAN compiler would have compiled
    only a few lines per minute. It was caught in time by simulation.

    But the MVS linker was slooooooooooow. I remember waiting for fifteen
    to 30 minutes of wall time for a link step to complete, on a much
    later model.

    Even though the
    address space was 16MB it was a long time before machines had that much
    RAM and by then they'd added paging to make the physical memory size less relevant.

    Browsing through Wikipedia, it seems the biggest memory on a /360
    was 6 MB.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Anton Ertl@21:1/5 to Terje Mathisen on Mon Sep 2 10:38:07 2024
    Terje Mathisen <terje.mathisen@tmsw.no> writes:
    Thomas Koenig wrote:
    [Commodore 1541]
    And were extremely slow - around 300 bytes per second, comparable
    to a card reader. But fast loaders could improve on that up to 10 kB/s.

    They did that by reading every 1/2 sector, then reassembling after 2 >rotations, instead of having to wait a full rotation between every
    sector read?

    No. The disk-access part of the disk drive was actually pretty cool, supporting variable data rate with a 6502. The variable data rate and group-code recording allowed getting 170KB on a single-sided
    single-density disk, while FM disk controllers typically got 85KB, and
    Wozniak got 140KB. I don't remember what was done about sector
    interleaving, but when you replaced the slow interface (see below) to
    the computer with a fast one (I have Prologic DOS), the drive was up
    to 28 times faster.

    The problem is in the data transfer between the drive (which had its
    own CPU) and the computer. They replaced the parallel IEEE-488
    interface of the PET with a serial interface for cost reasons, and
    then they botched the serial transfer. There were some contributing
    factors, like the 6522 bug (the C64 had no 6522, though), and the
    desired compatibility with the VIC-20 (which then did not happen
    anyway: the Commodore 1540 (for the VIC-20) does not work unmodified
    with the C64).

    They probably could still have fixed the problem by giving some more
    love to the firmware for the computer-to-disk-drive interface;
    according to <https://www.c64-wiki.de/wiki/Schnelllader>, the fastest
    serial fast-loaders were 15 times as fast as the serial routines in
    the firmware. I guess that, when the C64 was designed, disk drives
    were rare for computers with the price of the C64, so it did not seem
    that important to make that interface fast.

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

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Anssi Saari@21:1/5 to Thomas Koenig on Mon Sep 2 15:42:39 2024
    Thomas Koenig <tkoenig@netcologne.de> writes:

    Just reading up on this... it seems that there was a bug in the
    6522 I/O controller where the shift register sometimes dropped
    a bit due to a race condition, and the workaround which was
    hastily put in place was very slow.

    It was the VIC-20 which had the 6522 with that issue. C64 used a 6526.

    C64 floppy access, well, there was bug compatibility reasons and also
    some numbnut in production "optimized" away a couple of lines from the
    board that would've made disk access reasonably fast. I have a vague
    memory there were instructions on how to put those back and how to patch
    the ROM routines to use them, around when this came out in Brian
    Bagnall's Commodore histories. Can't find anything about it now so maybe
    I imagined it.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From EricP@21:1/5 to Anton Ertl on Mon Sep 2 09:38:04 2024
    Anton Ertl wrote:
    Terje Mathisen <terje.mathisen@tmsw.no> writes:
    Thomas Koenig wrote:
    [Commodore 1541]
    And were extremely slow - around 300 bytes per second, comparable
    to a card reader. But fast loaders could improve on that up to 10 kB/s.
    They did that by reading every 1/2 sector, then reassembling after 2
    rotations, instead of having to wait a full rotation between every
    sector read?

    No. The disk-access part of the disk drive was actually pretty cool, supporting variable data rate with a 6502. The variable data rate and group-code recording allowed getting 170KB on a single-sided
    single-density disk, while FM disk controllers typically got 85KB, and Wozniak got 140KB. I don't remember what was done about sector
    interleaving, but when you replaced the slow interface (see below) to
    the computer with a fast one (I have Prologic DOS), the drive was up
    to 28 times faster.

    The problem is in the data transfer between the drive (which had its
    own CPU) and the computer. They replaced the parallel IEEE-488
    interface of the PET with a serial interface for cost reasons, and
    then they botched the serial transfer. There were some contributing
    factors, like the 6522 bug (the C64 had no 6522, though), and the
    desired compatibility with the VIC-20 (which then did not happen
    anyway: the Commodore 1540 (for the VIC-20) does not work unmodified
    with the C64).

    They probably could still have fixed the problem by giving some more
    love to the firmware for the computer-to-disk-drive interface;
    according to <https://www.c64-wiki.de/wiki/Schnelllader>, the fastest
    serial fast-loaders were 15 times as fast as the serial routines in
    the firmware. I guess that, when the C64 was designed, disk drives
    were rare for computers with the price of the C64, so it did not seem
    that important to make that interface fast.

    - anton

    Looks like a set-up time violation causing meta-stability.

    https://en.wikipedia.org/wiki/MOS_Technology_6522#Bugs

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Scott Lurndal@21:1/5 to Lawrence D'Oliveiro on Mon Sep 2 15:34:09 2024
    Lawrence D'Oliveiro <ldo@nz.invalid> writes:
    On Fri, 30 Aug 2024 21:55:46 -0000 (UTC), John Levine wrote:

    I still have a copy of the Nevada COBOL compiler for the Commodore 64.

    The C64 was a supercomputer compared to a 1401.

    I don’t think it was possible to fit a COBOL compiler into a 64K address >space -- not without heavy overlaying.

    Clearly it was possible.

    https://commodore.software/downloads/download/211-application-manuals/13865-nevada-cobol-for-the-commodore-64

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Stephen Fuld@21:1/5 to John Levine on Mon Sep 2 09:35:20 2024
    On 9/2/2024 3:11 AM, John Levine wrote:

    snip

    Also don't forget that back in that era everyone who had disks used overlays.

    Not everyone. While you could do overlays on the 1108 and successors,
    it was infrequent. But using multiple banks was easy and convenient.
    An nice advantage of banking is that you could put shared libraries in
    their own banks, so you didn't have to worry about figuring out how to
    address them from the main program (as well as reducing the size of the
    main program banks). But I agree that nothing beats the simplicity of
    large linear address spaces.


    --
    - Stephen Fuld
    (e-mail address disguised to prevent spam)

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Lawrence D'Oliveiro@21:1/5 to John Levine on Wed Sep 4 08:15:03 2024
    On Mon, 2 Sep 2024 10:11:48 -0000 (UTC), John Levine wrote:

    It is true that the -11 died for lack of address space, but nobody I
    know has ever come up with a good design where the address size is
    bigger than the word size. You end up with segments as on the 286 or
    bank switching which is what later -11's did.

    It is true that, while the x86 segmentation system sucked, the PDP-11’s address limitations made it look good by comparison.

    VAX stood for Virtual Address Extension. The key improvement was the 32
    bit addresses. Everything else was a detail.

    Hey, don’t forget the kitchen-sink instruction set. ;)

    Also, the instruction format seemed quite elegant: one byte (or two bytes)
    for the opcode, followed by n operand descriptors (n being a function of
    the opcode), nearly all of which followed a single standard format.

    The fact that that layout was absolutely terrible for performance was discovered ... somewhat later.

    Also don't forget that back in that era everyone who had disks used
    overlays.

    Or multiple passes, as separate executables. One of our lecturers got hold
    of a copy of a Pascal compiler for our PDP-11. That consisted of two
    separate programs, and it wasn’t quite a complete Pascal implementation. I think Wirth’s Modula-2 compiler was made up of 4 or 5 passes; the VAX port mainly consisted of smooshing them all together into a single executable,
    and keeping all the intermediate data they passed to each other in memory.

    The IBM mainframe linkers had complicated ways to build
    overlays and squeeze programs into 64K or whatever.

    So did DEC. They even introduced an additional version of their “Task Builder” (“TKB”, the RSX-11 linker, which also ran on RSTS/E) that could build larger programs than the regular one: it was called the “Slow Task Builder” (“SLOTKB”).

    I never quite learned how to build overlaid programs. I tried to help a
    friend with this once, by going over the documentation with him to try
    clarify how to construct his .ODL (“Overlay Description Language”) file, but I don’t think he got as far as doing an actual build before the
    problem went away.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Lawrence D'Oliveiro@21:1/5 to Scott Lurndal on Wed Sep 4 08:19:09 2024
    On Mon, 02 Sep 2024 15:34:09 GMT, Scott Lurndal wrote:

    Lawrence D'Oliveiro <ldo@nz.invalid> writes:

    I don’t think it was possible to fit a COBOL compiler into a 64K address >>space -- not without heavy overlaying.. The DEC one for the PDP-11 was a
    280kiB executable

    Clearly it was possible.

    https://commodore.software/downloads/download/211-application-manuals/13865-nevada-cobol-for-the-commodore-64

    How big was that executable, again?

    (Don’t post random links unless you know what you’re talking about.)

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Terje Mathisen@21:1/5 to Lawrence D'Oliveiro on Wed Sep 4 10:58:38 2024
    Lawrence D'Oliveiro wrote:
    On Mon, 2 Sep 2024 10:11:48 -0000 (UTC), John Levine wrote:
    The IBM mainframe linkers had complicated ways to build
    overlays and squeeze programs into 64K or whatever.

    So did DEC. They even introduced an additional version of their “Task Builder” (“TKB”, the RSX-11 linker, which also ran on RSTS/E) that could
    build larger programs than the regular one: it was called the “Slow Task Builder” (“SLOTKB”).

    I never quite learned how to build overlaid programs. I tried to help a friend with this once, by going over the documentation with him to try clarify how to construct his .ODL (“Overlay Description Language”) file, but I don’t think he got as far as doing an actual build before the
    problem went away.

    Turbo Pascal had overlay support for a while, I did try it once. Afair
    it used a base layer thunking system where all cross-module calls passed through these thunks which would check that the correct overlay was
    currently loaded, swapping it in if needed. This was OK for making a
    bunch of calls from the base to a single overlay, but trashed horribly
    if/when you had calls between two different overlays.

    Terje

    --
    - <Terje.Mathisen at tmsw.no>
    "almost all programming can be viewed as an exercise in caching"

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Lawrence D'Oliveiro@21:1/5 to Terje Mathisen on Wed Sep 4 09:38:28 2024
    On Wed, 4 Sep 2024 10:58:38 +0200, Terje Mathisen wrote:

    Turbo Pascal had overlay support for a while, I did try it once. Afair
    it used a base layer thunking system where all cross-module calls passed through these thunks which would check that the correct overlay was
    currently loaded, swapping it in if needed. This was OK for making a
    bunch of calls from the base to a single overlay, but trashed horribly if/when you had calls between two different overlays.

    Sounds similar to the original 68K Macintosh executable format, where the
    code was stored in “CODE” resources: the CODE with ID 0 was the table of cross-segment entry points: CODE 1 contained the mainline, and you could
    split off parts of your program into additional higher-numbered segments
    as appropriate.

    There were two different approaches to this sort of overlay/segmentation system: the ones where segments containing calls to routines in progress
    could be swapped out (so a return to such a routine required it to be
    swapped back in), and ones where a segment was locked down as long as any routine in it had been entered but not yet exited.

    As I recall, the Mac used the latter form. This would consume more memory,
    but had less potential for trouble. Sounds like Turbo Pascal was trying
    the former approach.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From John Levine@21:1/5 to ldo@nz.invalid on Wed Sep 4 14:33:52 2024
    It appears that Lawrence D'Oliveiro <ldo@nz.invalid> said:
    It is true that, while the x86 segmentation system sucked, the PDP-11’s >address limitations made it look good by comparison.

    I don't think anyone at DEC thought it was an expansion mechanism. The 11/45 and /70
    had eight 8K pages in each address space of which there were six, two each for user, supervisor, and kernel. I think they thought it was paging, but of course
    8K pages were way too large. So they overreacted and the Vax pages were 512 bytes
    which were too small.

    VAX stood for Virtual Address Extension. The key improvement was the 32
    bit addresses. Everything else was a detail.

    Hey, don’t forget the kitchen-sink instruction set. ;)

    We can try to forget, but it's hard.

    Also don't forget that back in that era everyone who had disks used
    overlays.

    Or multiple passes, as separate executables. One of our lecturers got hold
    of a copy of a Pascal compiler for our PDP-11. That consisted of two
    separate programs, and it wasn’t quite a complete Pascal implementation. ...

    Good point. The dmr C compiler was four passes, a front end that turned source code into trees, a code generator that wrote assembler, an optional optimizer that rewrote the assembler, and the assembler which created the object file, Each pass was a separate program.

    The IBM mainframe linkers had complicated ways to build
    overlays and squeeze programs into 64K or whatever. ...

    I never quite learned how to build overlaid programs. ...

    When I was working on the DOS version of Javelin we used a linker that had overlays
    just like the mainframe linkers. I got it to work and squeezed the code into about 1/3 the space it'd take otherwise but it wasn't pleasant.

    --
    Regards,
    John Levine, johnl@taugh.com, Primary Perpetrator of "The Internet for Dummies",
    Please consider the environment before reading this e-mail. https://jl.ly

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Scott Lurndal@21:1/5 to John Levine on Wed Sep 4 15:10:09 2024
    John Levine <johnl@taugh.com> writes:

    Good point. The dmr C compiler was four passes, a front end that turned source
    code into trees, a code generator that wrote assembler, an optional optimizer >that rewrote the assembler, and the assembler which created the object file, >Each pass was a separate program.

    Five if you count cpp.

    effectively,

    cat file | cpp | c0 | c1 | c2 | as | ld

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From John Dallman@21:1/5 to All on Wed Sep 4 16:38:00 2024
    In article <vb9r4g$2o1f$1@gal.iecc.com>, johnl@taugh.com (John Levine)
    wrote:

    I think they thought it was paging, but of course 8K pages were way
    too large. So they overreacted and the Vax pages were 512 bytes
    which were too small.

    Everyone seems to use 4K pages now, and that works well for ordinary-size programs in 32- and 64-bit address spaces. Bigger pages have been
    available in many operating systems for a couple of decades, but they
    seem to have been only used by programs that used memory in specialised
    ways, like database indexes, and they were used on a per-process basis.

    The interesting thing that's happening now is that Android 15, due for
    release soon, allows for devices that /only/ use 16K pages. Since there's
    no conventional paging, they presumably want to keep the page tables from eating too much RAM.

    When I was working on the DOS version of Javelin we used a linker
    that had overlays just like the mainframe linkers. I got it to work
    and squeezed the code into about 1/3 the space it'd take otherwise
    but it wasn't pleasant.

    Was that PLink, the Phoenix linker? The project I worked on in 1986-87
    used that for similar squashing.

    John

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From MitchAlsup1@21:1/5 to John Dallman on Wed Sep 4 16:51:15 2024
    On Wed, 4 Sep 2024 15:38:00 +0000, John Dallman wrote:

    In article <vb9r4g$2o1f$1@gal.iecc.com>, johnl@taugh.com (John Levine)
    wrote:

    I think they thought it was paging, but of course 8K pages were way
    too large. So they overreacted and the Vax pages were 512 bytes
    which were too small.

    Everyone seems to use 4K pages now, and that works well for
    ordinary-size
    programs in 32- and 64-bit address spaces. Bigger pages have been
    available in many operating systems for a couple of decades, but they
    seem to have been only used by programs that used memory in specialised
    ways, like database indexes, and they were used on a per-process basis.

    For better or worse, My 66000 uses 8K pages.
    This has several advantages::
    a) it is a 5 level structure for a 63-bit virtual address space
    (instead of 6)
    b) each level gives you 1024 DoubleWords (instead of 512)
    10 is easier for humans to reason about than 9
    c) page sizes ae 8K, 8M, 8G, 8T, 8E, really big
    easier to reason through
    d) nested page walks are 5Ă—5 instead of 6Ă—6
    e) 1 more bit for doing something different.

    With level skipping one can map 'cat" in 1 page of MMY tables
    {one page of paging overhead}, and still scatter .code far from .data
    and .stack or .heap.

    The interesting thing that's happening now is that Android 15, due for release soon, allows for devices that /only/ use 16K pages. Since
    there's
    no conventional paging, they presumably want to keep the page tables
    from
    eating too much RAM.

    When I was working on the DOS version of Javelin we used a linker
    that had overlays just like the mainframe linkers. I got it to work
    and squeezed the code into about 1/3 the space it'd take otherwise
    but it wasn't pleasant.

    Was that PLink, the Phoenix linker? The project I worked on in 1986-87
    used that for similar squashing.

    John

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Scott Lurndal@21:1/5 to John Dallman on Wed Sep 4 17:08:50 2024
    jgd@cix.co.uk (John Dallman) writes:
    In article <vb9r4g$2o1f$1@gal.iecc.com>, johnl@taugh.com (John Levine)
    wrote:

    I think they thought it was paging, but of course 8K pages were way
    too large. So they overreacted and the Vax pages were 512 bytes
    which were too small.

    Everyone seems to use 4K pages now, and that works well for ordinary-size >programs in 32- and 64-bit address spaces. Bigger pages have been
    available in many operating systems for a couple of decades, but they
    seem to have been only used by programs that used memory in specialised
    ways, like database indexes, and they were used on a per-process basis.

    ARM64 supports 4k, 16k and 64k native pages (aka translation granules).

    Larger blocks (e.g. 512G) are supported in the processor
    by terminating the table walk at higher levels (so called Huge Pages)
    to reduce TLB pressure.

    Redhat used to ship ARM64 with 64k pages by default, while Ubuntu chose
    4k pages. I think RH has moved to 4k in recent ARM64 distributions.

    Linux supports THP (Transparent Huge Pages) were the OS automatically
    updates the translation table to coalsce smaller pages into larger blocks
    on intel/amd/arm64 processors.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Lawrence D'Oliveiro@21:1/5 to John Levine on Wed Sep 4 21:51:05 2024
    On Wed, 4 Sep 2024 14:33:52 -0000 (UTC), John Levine wrote:

    I think they thought it was paging, but of course 8K pages were way too large.

    Might have been to reduce the amount of hardware involved, and hence the
    cost.

    So they overreacted and the Vax pages were 512 bytes which were too
    small.

    The main issue, I think, was the proportion of physical RAM taken up by physical page tables. VMS didn’t have to fault pages in one by one, of course; it had the concept of a “page fault cluster size”, which was settable in various places. For example, for executable files, it was a
    field in the .EXE header; if this was zero (the usual value), it was interpreted as 16. So paging in from the executable would usually be done
    (as far as possible) 8 kibibytes at a time.

    I remember when we got Macsyma (symbolic maths package, written in Lisp) installed on our ’780, it was having way too much impact on system performance. So our sysadmin patched the .EXE file, setting the page fault cluster size to 1. And that improved things quite significantly.

    Remember, that was going from an effective paging unit of 8kiB, down to
    512 bytes.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Anton Ertl@21:1/5 to Scott Lurndal on Thu Sep 5 13:45:13 2024
    scott@slp53.sl.home (Scott Lurndal) writes:
    Linux supports THP (Transparent Huge Pages) were the OS automatically
    updates the translation table to coalsce smaller pages into larger blocks
    on intel/amd/arm64 processors.

    I have seen good effects from THP a number of years ago: I has seen a
    matrix multiply program miss the TLB every time on one of its input
    matrices. And then I ran it again, and the effect was gone.
    Eventually I found out that this is due to THP, and I have to disable
    THP if I want to demonstrate that effect to my students.

    Recently, I thought that by using a 2MB size for an mmap()-allocated
    memory block I would get THP on Linux. Unfortunately, mmap() does not
    aligng 2MB blocks to 2MB boundaries, and if it does not, the block is
    not eligible for THP. This was disappointing.

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

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Scott Lurndal@21:1/5 to Anton Ertl on Thu Sep 5 14:19:27 2024
    anton@mips.complang.tuwien.ac.at (Anton Ertl) writes:
    scott@slp53.sl.home (Scott Lurndal) writes:
    Linux supports THP (Transparent Huge Pages) were the OS automatically >>updates the translation table to coalsce smaller pages into larger blocks >>on intel/amd/arm64 processors.

    I have seen good effects from THP a number of years ago: I has seen a
    matrix multiply program miss the TLB every time on one of its input
    matrices. And then I ran it again, and the effect was gone.
    Eventually I found out that this is due to THP, and I have to disable
    THP if I want to demonstrate that effect to my students.

    Recently, I thought that by using a 2MB size for an mmap()-allocated
    memory block I would get THP on Linux. Unfortunately, mmap() does not
    aligng 2MB blocks to 2MB boundaries, and if it does not, the block is
    not eligible for THP. This was disappointing.

    Yes, to use fixed huge pages, you need to allocate sufficient RAM at
    boot time to support the alignment requirements.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From John Levine@21:1/5 to All on Thu Sep 5 14:59:20 2024
    According to John Dallman <jgd@cix.co.uk>:
    When I was working on the DOS version of Javelin we used a linker
    that had overlays just like the mainframe linkers. I got it to work
    and squeezed the code into about 1/3 the space it'd take otherwise
    but it wasn't pleasant.

    Was that PLink, the Phoenix linker? The project I worked on in 1986-87
    used that for similar squashing.

    Yes. It did what it did quite well. Javelin had multiple views of the internal model, each of which I put in an overlay. But it also had a split screen mode with two views at once, so I had to use two overlay areas
    and try to put some of the views in one area and some in the other so it
    wasn´t thrashing between two overlays when you made a change in one window
    and it updated the other window to match.

    What I really wanted was relocatable segments I could load on demand
    or paging, but that was a lot to ask of an 8088 or a real mode 286.

    --
    Regards,
    John Levine, johnl@taugh.com, Primary Perpetrator of "The Internet for Dummies",
    Please consider the environment before reading this e-mail. https://jl.ly

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From MitchAlsup1@21:1/5 to Anton Ertl on Thu Sep 5 19:55:36 2024
    On Thu, 5 Sep 2024 13:45:13 +0000, Anton Ertl wrote:

    scott@slp53.sl.home (Scott Lurndal) writes:
    Linux supports THP (Transparent Huge Pages) were the OS automatically >>updates the translation table to coalsce smaller pages into larger blocks >>on intel/amd/arm64 processors.

    I have seen good effects from THP a number of years ago: I has seen a
    matrix multiply program miss the TLB every time on one of its input
    matrices. And then I ran it again, and the effect was gone.
    Eventually I found out that this is due to THP, and I have to disable
    THP if I want to demonstrate that effect to my students.

    My 66000 supports large pages with one advancement--the bits not used
    to specify a page address are a count of the number of pages allocated
    to this large page-1. Thus one could start out with a heap with 1 page
    on a large boundary, and then incrementally add pages to the single
    PTE by incrementing the pages-count portion in the PTE.

    Recently, I thought that by using a 2MB size for an mmap()-allocated
    memory block I would get THP on Linux. Unfortunately, mmap() does not
    aligng 2MB blocks to 2MB boundaries, and if it does not, the block is
    not eligible for THP. This was disappointing.

    - anton

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Lawrence D'Oliveiro@21:1/5 to Anton Ertl on Sat Sep 7 23:42:23 2024
    On Thu, 05 Sep 2024 13:45:13 GMT, Anton Ertl wrote:

    Recently, I thought that by using a 2MB size for an mmap()-allocated
    memory block I would get THP on Linux. Unfortunately, mmap() does not
    aligng 2MB blocks to 2MB boundaries, and if it does not, the block is
    not eligible for THP.

    Checking the mmap(2) man page, I saw these:

    MAP_HUGETLB (since Linux 2.6.32)
    Allocate the mapping using "huge" pages. See the Linux
    kernel source file
    Documentation/adâ€min-guide/mm/hugetlbpage.rst for further
    information, as well as NOTES, below.

    MAP_HUGE_2MB
    MAP_HUGE_1GB (since Linux 3.8)
    Used in conjunction with MAP_HUGETLB to select
    alternative hugetlb page sizes (respectively, 2 MB and 1
    GB) on systems that support multiple hugetlb page sizes.

    Did you try those flags?

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Lawrence D'Oliveiro@21:1/5 to John Levine on Sat Sep 7 23:45:10 2024
    On Thu, 5 Sep 2024 14:59:20 -0000 (UTC), John Levine wrote:

    What I really wanted was relocatable segments I could load on demand or paging, but that was a lot to ask of an 8088 or a real mode 286.

    The Burroughs machines had swappable segments, I gather. So the difference between segmentation and paging came down to: the address space is still linear, but segments are variable-length, and pages are fixed-length.

    It was soon generally agreed that fixed-length pages were easier to deal
    with.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From MitchAlsup1@21:1/5 to Lawrence D'Oliveiro on Sun Sep 8 00:45:05 2024
    On Sat, 7 Sep 2024 23:45:10 +0000, Lawrence D'Oliveiro wrote:

    On Thu, 5 Sep 2024 14:59:20 -0000 (UTC), John Levine wrote:

    What I really wanted was relocatable segments I could load on demand or
    paging, but that was a lot to ask of an 8088 or a real mode 286.

    The Burroughs machines had swappable segments, I gather. So the
    difference
    between segmentation and paging came down to: the address space is still linear, but segments are variable-length, and pages are fixed-length.

    It was soon generally agreed that fixed-length pages were easier to deal with.

    Largely because you could swap out part of a segment.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Scott Lurndal@21:1/5 to mitchalsup@aol.com on Sun Sep 8 16:12:35 2024
    mitchalsup@aol.com (MitchAlsup1) writes:
    On Sat, 7 Sep 2024 23:45:10 +0000, Lawrence D'Oliveiro wrote:

    On Thu, 5 Sep 2024 14:59:20 -0000 (UTC), John Levine wrote:

    What I really wanted was relocatable segments I could load on demand or
    paging, but that was a lot to ask of an 8088 or a real mode 286.

    The Burroughs machines had swappable segments, I gather. So the
    difference
    between segmentation and paging came down to: the address space is still
    linear, but segments are variable-length, and pages are fixed-length.

    It was soon generally agreed that fixed-length pages were easier to deal
    with.

    Largely because you could swap out part of a segment.

    The portion of the Burroughs MCP that deal with rolling out and rolling
    in segments was called 'HIHO'.

    As in Hi Ho, Hi Ho, it's off to work we go...

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From MitchAlsup1@21:1/5 to Scott Lurndal on Sun Sep 8 17:47:51 2024
    On Sun, 8 Sep 2024 16:12:35 +0000, Scott Lurndal wrote:

    mitchalsup@aol.com (MitchAlsup1) writes:
    On Sat, 7 Sep 2024 23:45:10 +0000, Lawrence D'Oliveiro wrote:

    On Thu, 5 Sep 2024 14:59:20 -0000 (UTC), John Levine wrote:

    What I really wanted was relocatable segments I could load on demand or >>>> paging, but that was a lot to ask of an 8088 or a real mode 286.

    The Burroughs machines had swappable segments, I gather. So the
    difference
    between segmentation and paging came down to: the address space is still >>> linear, but segments are variable-length, and pages are fixed-length.

    It was soon generally agreed that fixed-length pages were easier to deal >>> with.

    Largely because you could swap out part of a segment.

    The portion of the Burroughs MCP that deal with rolling out and rolling
    in segments was called 'HIHO'.

    As in Hi Ho, Hi Ho, it's off to work we go...

    I O, I O, its off to the printer we go ...

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Lawrence D'Oliveiro@21:1/5 to All on Mon Sep 9 06:53:20 2024
    On Sun, 8 Sep 2024 00:45:05 +0000, MitchAlsup1 wrote:

    On Sat, 7 Sep 2024 23:45:10 +0000, Lawrence D'Oliveiro wrote:

    On Thu, 5 Sep 2024 14:59:20 -0000 (UTC), John Levine wrote:

    What I really wanted was relocatable segments I could load on demand
    or paging, but that was a lot to ask of an 8088 or a real mode 286.

    The Burroughs machines had swappable segments, I gather. So the
    difference between segmentation and paging came down to: the address
    space is still linear, but segments are variable-length, and pages are
    fixed-length.

    It was soon generally agreed that fixed-length pages were easier to
    deal with.

    Largely because you could swap out part of a segment.

    I’m assuming you meant “couldn’t” ...

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Lawrence D'Oliveiro@21:1/5 to Chris M. Thomasson on Mon Sep 9 06:52:53 2024
    On Sun, 8 Sep 2024 13:34:10 -0700, Chris M. Thomasson wrote:

    Ever use EIEIO? ;^D

    You got the POWER to do so? ;)

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From MitchAlsup1@21:1/5 to Lawrence D'Oliveiro on Mon Sep 9 16:55:44 2024
    On Mon, 9 Sep 2024 6:53:20 +0000, Lawrence D'Oliveiro wrote:

    On Sun, 8 Sep 2024 00:45:05 +0000, MitchAlsup1 wrote:

    On Sat, 7 Sep 2024 23:45:10 +0000, Lawrence D'Oliveiro wrote:

    On Thu, 5 Sep 2024 14:59:20 -0000 (UTC), John Levine wrote:

    What I really wanted was relocatable segments I could load on demand
    or paging, but that was a lot to ask of an 8088 or a real mode 286.

    The Burroughs machines had swappable segments, I gather. So the
    difference between segmentation and paging came down to: the address
    space is still linear, but segments are variable-length, and pages are
    fixed-length.

    It was soon generally agreed that fixed-length pages were easier to
    deal with.

    Largely because you could swap out part of a segment.

    I’m assuming you meant “couldn’t” ...

    With pages you can swap parts of a segment (page at a time)
    with segmentation (only) you cannot swap parts of the segment.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Lawrence D'Oliveiro@21:1/5 to All on Tue Sep 10 05:21:02 2024
    On Mon, 9 Sep 2024 16:55:44 +0000, MitchAlsup1 wrote:

    With pages you can swap parts of a segment (page at a time)
    with segmentation (only) you cannot swap parts of the segment.

    Mixing the two seems counterproductive, unless you have few, large
    segments. Burroughs-style segments were smaller and more numerous than
    that.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From John Levine@21:1/5 to All on Wed Sep 11 01:53:42 2024
    According to Lawrence D'Oliveiro <ldo@nz.invalid>:
    On Mon, 9 Sep 2024 16:55:44 +0000, MitchAlsup1 wrote:

    With pages you can swap parts of a segment (page at a time)
    with segmentation (only) you cannot swap parts of the segment.

    Mixing the two seems counterproductive, unless you have few, large
    segments. Burroughs-style segments were smaller and more numerous than
    that.

    Multics had paged segments. The segments were as I recall 18 bit word addressed
    so about a megabyte. The pages were perhaps 1K. It worked pretty well.

    An underappreciated advantage of paging is that the pages are all the same size. With variable sized segments you need to do memory shuffling to
    collect the empty space into larger chunks. The KA-10 which had two
    variable sized segments per process spent a lot of time doing memory
    shuffling.



    --
    Regards,
    John Levine, johnl@taugh.com, Primary Perpetrator of "The Internet for Dummies",
    Please consider the environment before reading this e-mail. https://jl.ly

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Lawrence D'Oliveiro@21:1/5 to John Levine on Wed Sep 11 07:41:36 2024
    On Wed, 11 Sep 2024 01:53:42 -0000 (UTC), John Levine wrote:

    According to Lawrence D'Oliveiro <ldo@nz.invalid>:

    On Mon, 9 Sep 2024 16:55:44 +0000, MitchAlsup1 wrote:

    With pages you can swap parts of a segment (page at a time) with
    segmentation (only) you cannot swap parts of the segment.

    Mixing the two seems counterproductive, unless you have few, large
    segments. Burroughs-style segments were smaller and more numerous than
    that.

    Multics had paged segments. The segments were as I recall 18 bit word addressed so about a megabyte. The pages were perhaps 1K. It worked
    pretty well.

    That’s what I mean about “large” segments. I think the segment size limited the file size as well.

    An underappreciated advantage of paging is that the pages are all the
    same size.

    Nothing underappreciated about it. It’s the reason why we have pages
    nowadays and no segments.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From MitchAlsup1@21:1/5 to Lawrence D'Oliveiro on Wed Sep 11 21:34:25 2024
    On Tue, 10 Sep 2024 5:21:02 +0000, Lawrence D'Oliveiro wrote:

    On Mon, 9 Sep 2024 16:55:44 +0000, MitchAlsup1 wrote:

    With pages you can swap parts of a segment (page at a time)
    with segmentation (only) you cannot swap parts of the segment.

    Mixing the two seems counterproductive, unless you have few, large
    segments. Burroughs-style segments were smaller and more numerous than
    that.

    I am not a fan of segmentation, I was responding to a direct question
    where someone was actively trying to misinterpret what I wrote.

    Paging won, just like LE won. Time to get over it.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Lawrence D'Oliveiro@21:1/5 to All on Wed Sep 11 23:45:08 2024
    On Wed, 11 Sep 2024 21:34:25 +0000, MitchAlsup1 wrote:

    On Tue, 10 Sep 2024 5:21:02 +0000, Lawrence D'Oliveiro wrote:

    On Mon, 9 Sep 2024 16:55:44 +0000, MitchAlsup1 wrote:

    With pages you can swap parts of a segment (page at a time) with
    segmentation (only) you cannot swap parts of the segment.

    Mixing the two seems counterproductive, unless you have few, large
    segments. Burroughs-style segments were smaller and more numerous than
    that.

    I am not a fan of segmentation ...

    Big segments versus small segments are quite different things.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Lars Poulsen@21:1/5 to Lawrence D'Oliveiro on Wed Sep 11 18:24:24 2024
    On Wed, 11 Sep 2024 21:34:25 +0000, MitchAlsup1 wrote:
    I am not a fan of segmentation ...

    On 9/11/2024 4:45 PM, Lawrence D'Oliveiro wrote:
    Big segments versus small segments are quite different things.

    Segments do different things. The aspect of segments that I liked in the
    80286 was that they provided an excewllent mechanism for array bounds
    checking. I would have loved having that option within a linear, paged
    address space. But the languages in wide use at the time did not support
    that.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Lawrence D'Oliveiro@21:1/5 to Lars Poulsen on Thu Sep 12 07:19:33 2024
    On Wed, 11 Sep 2024 18:24:24 -0700, Lars Poulsen wrote:

    On 9/11/2024 4:45 PM, Lawrence D'Oliveiro wrote:

    Big segments versus small segments are quite different things.

    Segments do different things. The aspect of segments that I liked in the 80286 ...

    I wasn’t talking about x86-style “segmentation”, which was just a hack to extend the address space in an awkward way. I was talking about segments
    within a linear address space (and I assumed Mitch was, too).

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Michael S@21:1/5 to Lawrence D'Oliveiro on Thu Sep 12 14:19:25 2024
    On Thu, 12 Sep 2024 07:19:33 -0000 (UTC)
    Lawrence D'Oliveiro <ldo@nz.invalid> wrote:

    On Wed, 11 Sep 2024 18:24:24 -0700, Lars Poulsen wrote:

    On 9/11/2024 4:45 PM, Lawrence D'Oliveiro wrote:

    Big segments versus small segments are quite different things.

    Segments do different things. The aspect of segments that I liked
    in the 80286 ...

    I wasn’t talking about x86-style “segmentation”, which was just a
    hack to extend the address space in an awkward way. I was talking
    about segments within a linear address space (and I assumed Mitch
    was, too).

    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.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From John Levine@21:1/5 to All on Thu Sep 12 20:15:01 2024
    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.

    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.


    --
    Regards,
    John Levine, johnl@taugh.com, Primary Perpetrator of "The Internet for Dummies",
    Please consider the environment before reading this e-mail. https://jl.ly

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From MitchAlsup1@21:1/5 to John Levine on Thu Sep 12 20:48:41 2024
    On Thu, 12 Sep 2024 20:15:01 +0000, John Levine wrote:

    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.

    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.

    Intel's only other choice was to use more than 32-bits as the segment
    base address and they had run out of bits.


    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From John Dallman@21:1/5 to Michael S on Thu Sep 12 22:33:00 2024
    In article <20240912141925.000039f3@yahoo.com>, already5chosen@yahoo.com (Michael S) wrote:

    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.

    Yup. 80286 segmentation is horribly complicated as compared to real mode,
    and still gives you tiny segments. The only widespread OS that used it
    AFAIK was OS/2 1.x, much to its disadvantage. IBM's insistence that OS/2
    run on the 286 was a world-shaping mistake.

    386 mode was far more useful, and survives to the present day.

    John

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From John Levine@21:1/5 to All on Thu Sep 12 21:26:01 2024
    According to MitchAlsup1 <mitchalsup@aol.com>:
    The 386 had 32 bit segments which should have made segmented code
    practical and efficient ...

    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.

    Intel's only other choice was to use more than 32-bits as the segment
    base address and they had run out of bits.

    The other choice would have been a page table per segment, like Multics did.

    That would have been more hardware for the pager, no idea whether it
    would have been practical to build with the chip process available at the time.


    --
    Regards,
    John Levine, johnl@taugh.com, Primary Perpetrator of "The Internet for Dummies",
    Please consider the environment before reading this e-mail. https://jl.ly

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Lawrence D'Oliveiro@21:1/5 to John Dallman on Thu Sep 12 22:13:04 2024
    On Thu, 12 Sep 2024 22:33 +0100 (BST), John Dallman wrote:

    IBM's insistence that OS/2 run on the 286 was a world-shaping mistake.

    Apparently it was to fulfil a promise made to customers who bought the
    original PC AT, that IBM would someday offer an OS to take advantage of
    its protected-mode features.

    Of course, by the time OS/2 shipped, nobody cared any more.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Lars Poulsen@21:1/5 to John Dallman on Thu Sep 12 15:23:31 2024
    On 9/12/2024 2:33 PM, John Dallman wrote:
    In article <20240912141925.000039f3@yahoo.com>, already5chosen@yahoo.com (Michael S) wrote:

    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.

    Yup. 80286 segmentation is horribly complicated as compared to real mode,
    and still gives you tiny segments. The only widespread OS that used it
    AFAIK was OS/2 1.x, much to its disadvantage. IBM's insistence that OS/2
    run on the 286 was a world-shaping mistake.

    386 mode was far more useful, and survives to the present day.

    John

    The subset of 386 mode that ended up being used was just a single flat
    virtual address space per process with paging.

    I found 286 mode very useful. We used it in an bedded system with a "DOS Extender". We made malloc() give us a fresh segment for every call, and
    it caught a lot of simple code bugs. Bounds checking with very low overhead.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Lawrence D'Oliveiro@21:1/5 to John Levine on Thu Sep 12 22:15:05 2024
    On Thu, 12 Sep 2024 21:26:01 -0000 (UTC), John Levine wrote:

    The other choice would have been a page table per segment, like Multics
    did.

    Remember that Multics segments all existed within a common, directly linearly-addressable address space. Intel never had a segmentation scheme
    that worked this way.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From John Dallman@21:1/5 to D'Oliveiro on Fri Sep 13 09:56:00 2024
    In article <vbvp1f$esm6$4@dont-email.me>, ldo@nz.invalid (Lawrence
    D'Oliveiro) wrote:
    On Thu, 12 Sep 2024 22:33 +0100 (BST), John Dallman wrote:
    IBM's insistence that OS/2 run on the 286 was a world-shaping
    mistake.

    Apparently it was to fulfil a promise made to customers who bought
    the original PC AT, that IBM would someday offer an OS to take
    advantage of its protected-mode features.

    Of course, by the time OS/2 shipped, nobody cared any more.

    Not quite. IBM had sold lots of PS/2 Model 50 and Model 60 machines with
    the promise they would run OS/2. Since PS/2 and OS/2 were announced in
    April 1987, and OS/2 1.0 shipped in December the same year, evading the
    promise would have mattered a lot to IBM's corporate customers.

    Making all the PS/2 machines i386-based would have solve that problem,
    but was doubtless considered too expensive.

    John

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Anton Ertl@21:1/5 to John Levine on Fri Sep 13 08:13:16 2024
    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>

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From George Neuner@21:1/5 to lars@beagle-ears.com on Fri Sep 13 13:47:01 2024
    On Wed, 11 Sep 2024 18:24:24 -0700, Lars Poulsen
    <lars@beagle-ears.com> wrote:

    On Wed, 11 Sep 2024 21:34:25 +0000, MitchAlsup1 wrote:
    I am not a fan of segmentation ...

    On 9/11/2024 4:45 PM, Lawrence D'Oliveiro wrote:
    Big segments versus small segments are quite different things.

    Segments do different things. The aspect of segments that I liked in the >80286 was that they provided an excewllent mechanism for array bounds >checking. I would have loved having that option within a linear, paged >address space. But the languages in wide use at the time did not support >that.

    One (of many) problem with 286 segments was that there simply were not
    enough available to be really useful. You need enough for every
    object in the program.

    Intel had the opportunity to do segmentation much better with the 386,
    but they fumbled it badly: too slow - and no more segments possible
    than with 286.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From MitchAlsup1@21:1/5 to George Neuner on Fri Sep 13 23:20:27 2024
    On Fri, 13 Sep 2024 17:47:01 +0000, George Neuner wrote:

    On Wed, 11 Sep 2024 18:24:24 -0700, Lars Poulsen
    <lars@beagle-ears.com> wrote:

    On Wed, 11 Sep 2024 21:34:25 +0000, MitchAlsup1 wrote:
    I am not a fan of segmentation ...

    On 9/11/2024 4:45 PM, Lawrence D'Oliveiro wrote:
    Big segments versus small segments are quite different things.

    Segments do different things. The aspect of segments that I liked in the >>80286 was that they provided an excewllent mechanism for array bounds >>checking. I would have loved having that option within a linear, paged >>address space. But the languages in wide use at the time did not support >>that.

    One (of many) problem with 286 segments was that there simply were not
    enough available to be really useful. You need enough for every
    object in the program.

    The modern way to state this is that:: "You need an unbounded number
    of segments"

    Intel had the opportunity to do segmentation much better with the 386,
    but they fumbled it badly: too slow - and no more segments possible
    than with 286.

    Segments are one thing that is exceptionally hard to virtualize,
    especially when you have an unbounded number.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Lawrence D'Oliveiro@21:1/5 to All on Sat Sep 14 01:43:07 2024
    On Fri, 13 Sep 2024 23:20:27 +0000, MitchAlsup1 wrote:

    The modern way to state this is that:: "You need an unbounded number of segments"

    That would be true of small ones (Ă  la Burroughs and I guess Multics/
    GE-645), not large ones.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Scott Lurndal@21:1/5 to Lawrence D'Oliveiro on Sat Sep 14 19:04:17 2024
    Lawrence D'Oliveiro <ldo@nz.invalid> writes:
    On Fri, 13 Sep 2024 23:20:27 +0000, MitchAlsup1 wrote:

    The modern way to state this is that:: "You need an unbounded number of
    segments"

    That would be true of small ones (Ă  la Burroughs and I guess Multics/ >GE-645), not large ones.

    The HP-3000 (classic) supported 256 variable length segments (up to 64KB) per process.

    The Burroughs Large systems supported effectively unlimited numbers
    of active segments (bounded only by stack size).

    The Burroughs Medium systems supported 10^8 segments per process, any eight of which could be active at any one time. The call (VEN) instruction could
    switch to one of 10^6 "environments", each of which contained
    eight directly accessible and 92 indirectly[*] accessible 1 million
    digit segments (500KB maximum per segment).

    [*] Via special instructions.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)