From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Thread: fdd80,20cce773a38e2849 X-Google-NewGroupId: yes X-Google-Thread: 1164f8,20cce773a38e2849 X-Google-NewGroupId: yes X-Google-Thread: ffc31,20cce773a38e2849 X-Google-NewGroupId: yes X-Google-Attributes: gide311f70d09,gidd180ab3bd8,gidf4c4f7386e,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news1.google.com!npeer03.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!nx01.iad01.newshosting.com!newshosting.com!news2.euro.net!feeder.news-service.com!85.214.198.2.MISMATCH!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail From: "Jerome H. Fine" Newsgroups: alt.sys.pdp11,comp.sys.dec,vmsnet.pdp-11 Subject: Re: Y3K for PDP-11 Operating Systems Date: Wed, 25 May 2011 21:14:15 -0400 Organization: Just Sufficient Message-ID: References: <4d99c3b6$0$23756$14726298@news.sunsite.dk> <4dc1e27c.40366475@news.tpgi.com.au> <93vbcaF3luU1@mid.individual.net> <940bm5Fcc3U1@mid.individual.net> <941ob1Fre1U1@mid.individual.net> <9425gcFhnpU1@mid.individual.net> <942hghFhukU1@mid.individual.net> <944mhrF19qU1@mid.individual.net> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="------------090507090209090700030105" Injection-Date: Thu, 26 May 2011 01:13:21 +0000 (UTC) Injection-Info: mx04.eternal-september.org; posting-host="G2KmArP0kKSRH0Lo7dR9FQ"; logging-data="26409"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+5jokubRnC8anziif6IPRe" User-Agent: Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.7.2) Gecko/20040804 Netscape/7.2 (ax) In-Reply-To: <944mhrF19qU1@mid.individual.net> X-Accept-Language: en-us, en Cancel-Lock: sha1:EtPwqwN1jSnpNmBZA1JZm6w3RdY= Xref: g2news2.google.com alt.sys.pdp11:2218 comp.sys.dec:3552 vmsnet.pdp-11:646 This is a multi-part message in MIME format. --------------090507090209090700030105 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit >Bill Gunshannon wrote: >Yes, but outside the PDP-11, when was the last time you actually had to >worry about it as a programmer? Or figuring out overlays. Now there >was a science!! > Just thought I would add a bit of information about overlays in response to "Now there was a science!!". I made some modifications to MACRO-11 which counts the number of times an overlay is read into memory in addition to the number of times the overlay is called - the difference being the number of times the overlay was called, but was already memory. The numbers are displayed at the end of the listing along with the elapsed time. A sample output follows this post. Note that the same assembly takes over 11 minutes on a PDP-11/83. MACRO-11 has one root section (or permanent overlay) and 13 overlay segments distributed across 3 regions: Region 1: 1 2 3 4 Region 2: 5 6 7 8 9 Region 3: 10 11 12 13 Outside of initialization and termination code, only overlays 4, 9 and 11 seem to be used or one from each region. Summarizing the results is very easy. Most overlays are read into memory (after being called, of course) a limited number of times no matter how large the source code. Overlays 4, 9 and 11 can be called (without being read into memory) hundreds of thousands of times. An order of magnitude estimate is about 1 million total calls for each 1000 blocks of source code. BUT, THE TOTAL NUMBER OF READS IS LESS THAN 100 FOR EVERY EXAMPLE THAT WAS TESTED!!!!!!!!!!!!!!!!! The overlay handler uses only about a dozen instructions to call an overlay segment which is already in memory. So the overhead in minimal if the subroutine being called does not need to be read into memory. I agree that DEC had many decades to optimize MACRO-11. Perhaps DEC even wrote its own test code which did the same as my modification. The counts were not hard to keep once I saw the expected results - 32 bit count for the number of calls and a 16 bit counts for the number of reads or 3 words for each overlay. For extra insurance, I also kept a 48 bit count for the total number of calls and the total number of reads (just in case) since each additional word required only the "AdC (R0)+" instruction with no testing or branches after the first word used "Add #1,(R0)+" to advance the count. Since I initially had no idea how many calls or reads were being made, a 48 bit count was guaranteed to be sufficient. Printing out the results was the difficult part. If anyone is interested, let me know. After I finish the documentation, I will release the code. Meanwhile, if you have an example you want to check, I can download the files if they are more than 1 MB. Otherwise, use Zip or BZip2 and e-mail me the files which should reduce them to less than 1/2 MB. Please include a SYSMAC.SML file if you need a particular version. Jerome Fine ------------------------------------------------------------------------------------------ Sample Set of Count Values - Approximately 1100 blocks of Source Files Errors detected: 0 *** Assembler statistics Work file reads: 943 Work file writes: 756 Size of work file: 38984 Words ( 153 Pages) Size of core pool: 21760 Words ( 85 Pages) Use of Overlays: 1 2 3 4 5 6 7 8 9 10 11 12 13 Total Segment Calls: 11 5 3 528006 1 1 3 7 494138 106 135960 12 0 1158253 Required Reads: 11 5 3 10 1 1 3 5 6 10 20 10 0 85 Operating system: RT-11 Program File Name: LD2:MACRO.SAV[93] Names of .FETCHed: None Device Drivers: None Elapsed time: 00:00:39.07 --------------090507090209090700030105 Content-Type: text/html; charset=us-ascii Content-Transfer-Encoding: 7bit
>Bill Gunshannon wrote:
Yes, but outside the PDP-11, when was the last time you actually had to
worry about it as a programmer?  Or figuring out overlays.  Now there
was a science!!
Just thought I would add a bit of information about overlays
in response to "Now there was a science!!".

I made some modifications to MACRO-11 which counts the
number of times an overlay is read into memory in addition
to the number of times the overlay is called - the difference
being the number of times the overlay was called, but was
already memory.  The numbers are displayed at the end
of the listing along with the elapsed time.

A sample output follows this post.  Note that the same assembly
takes over 11 minutes on a PDP-11/83.

MACRO-11 has one root section (or permanent overlay) and 13
overlay segments distributed across 3 regions:
Region 1:   1   2   3   4
Region 2:   5   6   7   8   9
Region 3: 10 11 12 13

Outside of initialization and termination code, only overlays 4,
9 and 11 seem to be used or one from each region.

Summarizing the results is very easy.  Most overlays are read
into memory (after being called, of course) a limited number
of times no matter how large the source code.  Overlays 4,
9 and 11 can be called (without being read into memory)
hundreds of thousands of times.  An order of magnitude
estimate is about 1 million total calls for each 1000 blocks
of source code.

BUT,  THE  TOTAL  NUMBER  OF  READS  IS  LESS
THAN  100  FOR  EVERY  EXAMPLE  THAT  WAS
TESTED!!!!!!!!!!!!!!!!!

The overlay handler uses only about a dozen instructions to
call an overlay segment which is already in memory.  So the
overhead in minimal if the subroutine being called does not
need to be read into memory.

I agree that DEC had many decades to optimize MACRO-11.
Perhaps DEC even wrote its own test code which did the same
as my modification.  The counts were not hard to keep once I
saw the expected results - 32 bit count for the number of calls
and a 16 bit counts for the number of reads or 3 words for each
overlay.  For extra insurance, I also kept a 48 bit count for the
total number of calls and the total number of reads (just in case)
since each additional word required only the "AdC  (R0)+"
instruction with no testing or branches after the first word used
"Add  #1,(R0)+" to advance the count.  Since I initially had no
idea how many calls or reads were being made,  a 48 bit
count was guaranteed to be sufficient.  Printing out the results
was the difficult part.

If anyone is interested, let me know.  After I finish the documentation,
I will release the code.  Meanwhile, if you have an example you want
to check, I can download the files if they are more than 1 MB.  Otherwise,
use Zip or BZip2 and e-mail me the files which should reduce them to
less than 1/2 MB.  Please include a SYSMAC.SML file if you need
a particular version.

Jerome Fine
------------------------------------------------------------------------------------------
          Sample Set of Count Values - Approximately 1100 blocks of Source Files

Errors detected:  0

*** Assembler statistics


Work  file  reads: 943
Work  file writes: 756
Size of work file: 38984 Words  ( 153 Pages)
Size of core pool: 21760 Words  ( 85 Pages)
Use  of  Overlays:    1   2   3      4   5   6   7   8      9  10     11  12  13    Total
   Segment  Calls:   11   5   3 528006   1   1   3   7 494138 106 135960  12   0  1158253
   Required Reads:   11   5   3     10   1   1   3   5      6  10     20  10   0       85
Operating  system: RT-11
Program File Name: LD2:MACRO.SAV[93]
Names of .FETCHed: None
   Device Drivers: None

Elapsed time: 00:00:39.07
--------------090507090209090700030105--