PDP-11 Overlays
Johnny Billquist
bqt at update.uu.se
Mon Sep 21 20:42:50 CDT 2015
On 2015-09-21 21:41, Paul Koning wrote:
>
>> On Sep 21, 2015, at 3:14 PM, Jerome H. Fine <jhfinedp3k at compsys.to> wrote:
>>
>> Recently, there have been a number of references to using
>> overlays on the PDP-11. There have also been strong suggestions
>> that overlays were structured differently under the 3 operating
>> systems: RSTS/E, RSX-11 and RT-11.
>>
>> Obviously, I understand how RT-11 overlays were set up, but
>> for those readers who don't:
>>
>> ROOT
>> - contains overlay code subroutines and data tables
>> - data used by more than one overlay
>>
>> FIRST Overlay Region - size of the largest overlay in the region
>> - one or more overlays and the data used by just that overlay
>>
>> SECOND Overlay Region - size of the largest overlay in the region
>> - one or more overlays and the data used by just that overlay
>>
>> THIRD Overlay Region - size of the largest overlay in the region
>> - one or more overlays and the data used by just that overlay
>>
>> FREE MEMORY
>>
>> Any overlay could be called from any location. About the only
>> requirement was that the calling instruction code (specifically the
>> code which followed the calling instruction) had to be in memory
>> when the code returned from the overlay. In practice, the usual
>> protocol was that an overlay in a higher region was only called
>> from a lower region or the root.
>>
>> I understand that RSTS/E and RSX-11 were a bit more complex.
>> Can anyone briefly summarize and also provide a link to the
>> details in the appropriate manual if it is available on the internet?
>
> RSTS has no specific structure of its own. It provided both RT-11 and RSX emulation, and as a result would offer the structures from both of those, depending on which environment you chose for a particular application.
Right. In a way you could say that in RSTS/E you pick the best solution
for the job. No need to tie yourself one way or the other. I wonder, did
anyone ever write a Unix RTS for RSTS/E? It should be doable...
> RSX uses a tree structure. For details (lots of details) see the TKB manual.
Indeed. The TKB manuals is what Jerome needs to read if he really wants
to know...
> Suppose you have main which calls o1. o1 calls o2 which calls o3, and o1 also calls o5 which calls o6.
>
> In the RSX case, you could specify a tree with two branches: main to o1 and from there o2 to o3, and o5 to o6. In the RT11 case, you might put o1 in region 1, o2 and o5 in region 2, and o3 and o6 in region 3.
>
> The memory requirements would be:
>
> rt11: main + o1 + max (o2, o5) + max (o3, o6)
> rsx: main + o1 + max (o2 + o3, o5 + o6)
>
> If o2 and o6 are large while o3 and o5 are small, then the RSX case gives you a smaller memory footprint.
No need to stop there. Like you said, it is a tree. And exactly how many
branches, how deep, or how much you put in each "node" is up to you. But
in addition, you also have co-trees. No need for just one tree. You can
have many. The only rules are that you cannot call something up the
tree, except to the root.
With co-trees, you get several roots. Which means, in turn, that you can
have several branches that all call the same routine, even though that
routine is also in an overlay, since this will not break the tree
structure. (Assuming the routine you call is in another co-tree.)
In addition, overlays in RSX can be either autoloading, or you can write
your own code to actually do the loading. And overlays can either be
disk resident, or memory resident. Memory resident overlays are way
faster, since they work by instead doing PLAS calls to just change the
task mappings, and do not involve the disk at all. However, that also
means that your overlays always start on an even 8K.
The whole thing can become very complex, and you have a whole language
to describe how your overlays are laid out, relates to each other, how
they are loaded, and so on. It's called the Overlay Description
Language, or ODL. The largest ODL-file I've ever done was for DUNGEON
version 3.2 (sorry, will only fit on RSX-11M-PLUS), and that thing is 70
lines of stuff. A few empty lines, but mostly code.
The largest I've touched is for RMD, which weights in at 177 lines to
describe the overlay structure.
Johnny
--
Johnny Billquist || "I'm on a bus
|| on a psychedelic trip
email: bqt at softjar.se || Reading murder books
pdp is alive! || tryin' to stay hip" - B. Idol
More information about the cctech
mailing list