[Simh] EXT :Re: Unattended background SIMH process

Johnny Billquist bqt at softjar.se
Thu Dec 5 15:57:15 EST 2019


On 2019-12-05 18:33, Lars Brinkhoff wrote:
> Paul Koning wrote:
>>> David Hittner wrote:
>>> Mark can correct me if I'm wrong, but I believe that most of the
>>> SIMH simulators can already save the state (from the ^E prompt) and
>>> restore using the SAVE and RESTORE commands.
>>
>> I think the other change needed is delivery of power fail interrupts.
> 
> I and a few others had this discussion with Mark earlier this year, and
> the conclusion was that everything is already there.  If you SIGTERM the
> SIMH process it will go so the simulator prompt, but if it was running
> from a script it will continue after "go".  So you can put your SAVE
> command there.

Which is a very different thing than a power fail interrupt. On a real 
PDP-11, an interrupt is generated when the hardware detects that power 
is going away. At that point you have maybe 100ms of time left to do 
some work. The processor would then save the volatile state of the CPU 
in memory, and then halt.

When power is restored, the CPU starts up at the vector used at restart, 
at which point the software detects that there was a power failure, so 
it restores CPU state from the saved content in memory, and then resumes 
operation. RSX then also causes an AST for every program that has 
declared interest, and calls the power fail vector of every device 
driver, so that they can recover. Recover might be rather different for 
different drivers and applications. You might have programs that tries 
to reestablish network connections, or clean up time dependent 
operations, or restarts some work that is dependent on external things.

A pure save/restore of the simh context would cause the OS to be totally 
unaware that this happened, which would possibly not at all be as nice.

   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 Simh mailing list