[Simh] PDP-10 timer problems

Jordi Guillaumes i Pons jg at jordi.guillaumes.name
Fri May 18 05:15:54 EDT 2012


Hello list,

There is something wrong in the PDP10 timer/clock handling. Take a look at this job accounting data:

  375       10:02:13 BATCH      .KJOB/BATCH
  376       10:02:13 USER
  377       10:02:13 USER       [LGNJSP Other jobs same PPN:14]
  378       10:02:13 USER       [LGNDTF Deleted 8 TMP file; 130 blocks freed]
  379       10:02:13 USER       Job 15  User JGUILLAUMES [200,200]
  380       10:02:13 USER       Logged-off TTY23  at 10:02:14  on 18-May-112
  381       10:02:13 USER       Runtime: 1:40:08, KCS:60085, Connect time: 0:00:53
  382       10:02:13 USER       Disk Reads:807, Writes:155, Blocks saved:3910                                  

It's obvious than a runtime of 1:40:08 is not possible with  a connect time of 0:00:53 ;). It seems that the CPU time calculation is wrong. It _could_ be a TOPS-10 bug, but...

If I MONGEN a monitor specifying a (wrong) 50 Hz clock frequency then the real time clock goes faster than normal (as expected), but the CPU time calculation is not wrong. At least, it does NOT look wrong. The numbers you get are coherent with the elapsed time:


  115       11:10:37 BATCH      .KJOB/BATCH
  116       11:10:37 USER
  117       11:10:37 USER       [LGNJSP Other jobs same PPN:11]
  118       11:10:37 USER       Job 13  User JGUILLAUMES [200,200]
  119       11:10:37 USER       Logged-off TTY23  at 11:10:38  on 18-May-112
  120       11:10:37 USER       Runtime: 0:00:01, KCS:21, Connect time: 0:00:56
  121       11:10:37 USER       Disk Reads:1417, Writes:450, Blocks saved:4020                                 


The CPU time problem is a little bit annoying. The default for the batch queues is 5 minutes of CPU time, and if you specify the /TIME qualifier without a value it goes up to one hour. That means most of jobs abort for exceeding their time unless you specify something crazy like 24 hours. The problem manifests when you try to do a GALGEN, which is based in a string of batch jobs: most of them cancel because of this.

I've taken a look both into the timer C code for the simulator and the MACRO source for the monitor. As obvious, I didn't understand a lot about MACRO-10 :), and on the other hand it could take some time for me to really understand how the timer stuff works in SIMH. I could take a shot at it, if someone cares to baby-sit me in the process ;) I see the 60 Hz value is a constant in pdp10_tim.c, but I see that constant relates to other constants, and its handling differs in the different CPU flavours, so I've not dared to change it to 50 :) No idea about the consequences. I don't even know how the timer communicates with the CPU, how does it generate its interrupts and all the low-level stuff. Is there any low-level SIMH docs I could read? I don't have a lot of free time, but I enjoy this stuff much more than the stupid IT management work I do for a living ;)



Jordi Guillaumes i Pons
jg at jordi.guillaumes.name





More information about the Simh mailing list