[Simh] EXT :Re: Unattended background SIMH process

Hittner, David T [US] (MS) david.hittner at ngc.com
Thu Dec 5 10:37:40 EST 2019


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 this capability was added to facilitate very long debugging sessions over a multi-day period.

It's possible that the only thing that might need to be added to SIMH to support an automatic save on a hardware power fail is the ability for the master thread to detect the power fail event and initiate an auto-save, and of course enough time to actually perform the save before the power fails. Potentially this power fail detection and auto-save from the master thread could be enabled by something like a "POWERFAIL AUTOSAVE <filename>" command.

Unfortunately, there's frequently not enough time to write a state file to disk before the real power actually fails. However, this auto-save feature could potentially be of significant value if the SIMH simulator was running in a virtual machine, and could detect the VM shutdown event, and perform  the SIMH auto-save during the VM shutdown processing.

David

-----Original Message-----
From: Simh [mailto:simh-bounces at trailing-edge.com] On Behalf Of Paul Koning
Sent: Wednesday, December 4, 2019 9:06 PM
To: Johnny Billquist <bqt at softjar.se>
Cc: Simh <simh at trailing-edge.com>
Subject: EXT :Re: [Simh] Unattended background SIMH process



> On Dec 4, 2019, at 8:05 PM, Johnny Billquist <bqt at softjar.se> wrote:
> 
> On 2019-12-05 01:34, Paul Koning wrote:
>>> On Dec 4, 2019, at 6:15 PM, Kevin Handy <khandy21yo at gmail.com> wrote:
>>> 
>>> What it sounds like you need, is  for simh to detect the shutdown interrupt itself, and then save the current state of everything in the machine to a file. Upon power-up, it then needs to restore back to that state.
>>> You;d have to save the current configuration settings,  state of memory, cpu registers, device structures, etc., and then be able to read it all back in and restore everything back to a working state. Could get complicated, for example the disk drive have a timer in them so that they don't respond instantly to read requests, so this type of thing would need to be saved.
>>> Is it possible to manually do this right now? Store the state of a machine, them restore it back using simh commands to individually reset all the devices?
>> On a PDP11, this could be handled via a power fail interrupt, assuming the OS you have supports power fail and recovery. RSTS-11, with core memory (so you'd want to persist the memory across restarts) does. I'm not sure if others do.  (RSTS/E does not.)
> 
> Right. And all members of RSX do handle power fail and recovery. Individual programs can also be notified if a power fail even happened while they were running, in case there is something they need to do under such circumstances.

I should have remembered that.  In fact, on IAS (and RSX-11/D if I remember right), the system boot takes advantage of this: the SAV command saves a system image on disk, the boot loader reads that back in, and then power fail ASTs are delivered to all the relevant parts to restore them to operating state.  Neat trick.

In RSTS-11, a power fail and recovery simply leaves the system state as it was, with all the logged in terminals still logged in.  For a long power outage that's not really a good feature.  I saw it work once while in college.  RSTS/E dropped this because of the switch to semiconductor memory; instead it offers automatic restart (a clean startup, so everything is logged out and back to idle).

	paul


_______________________________________________
Simh mailing list
Simh at trailing-edge.com
http://mailman.trailing-edge.com/mailman/listinfo/simh


More information about the Simh mailing list