Sujet : Re: Why I've Dropped In
De : quadibloc (at) *nospam* gmail.com (quadibloc)
Groupes : comp.archDate : 14. Jun 2025, 22:49:04
Autres entêtes
Organisation : novaBBS
Message-ID : <10bc6d62468e8f6bfbf2882d8b929941@www.novabbs.com>
References : 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
User-Agent : Rocksolid Light
On Sat, 14 Jun 2025 21:26:10 +0000, quadibloc wrote:
On Sat, 14 Jun 2025 19:23:59 +0000, Stephen Fuld wrote:
>
That is precisely my point. The mechanism that IBM chose effectively
*prevents* program relocation. That is why I believe it was a mistake
to choose that mechanism.
>
It prevents relocation of programs currently in use that are already in
memory.
Actually, to be more precise, it prevents doing this _in a manner that
is fully transparent to the programmer_.
So IBM could have created a time-sharing operating system that ran on
models of the System/360 other than the model 67 with its Dynamic
Address Translation hardware as follows:
Require that programs only use one set of static base registers for
their entire run;
Require that programs describe the base registers they use in a standard
header;
Require that programs set a flag when they have finished initializing
those base registers (and do so very quickly after being started).
If those conditions are met, then a program in memory can indeed be
moved to somewhere else in memory, as the operating system will know
which base registers to adjust.
Well, sort of. Such programs would not be able to use flat addresses to
pass pointers between routines, because they would not be valid between
relocations. A workaround for this issue may be possible, requiring
changes to calling conventions; for example, all routines in a program
might need to share a common area for data values, and always use the
same base register to point to it.
So you would have special time-sharing versions of all the compilers.
John Savard