[Simh] VMS on SIMH/VAX on FreeBSD 9.0

Mark Pizzolato - Info Comm Mark at infocomm.com
Thu May 24 11:33:15 EDT 2012


On Thursday, May 24, 2012, at 7:40 AM, Lennert Van Alboom wrote:
> Has anyone managed to get cpu idle detection working on FreeBSD (9.0-
> RELEASE)?
> Whenever I try to set the idle option, I get the following:
> 
> vax.ini.autostart> SET CPU IDLE
> Command not allowed
> vax.ini.autostart> SET CPU IDLE=VMS
> Command not allowed
> 
> Same happens with the other options (Ultrix, OpenBSD, ...).
> 
> I tried upgrading to SIMH 3.9.0, but that didn't change anything. And I can't
> have SIMH eat a full core nonstop... :-)

The concept of CPU idling depends on the simulator being able to sleep with sufficiently small granularity that events in the simulated system 'seem' to happen at the normally expected times.   The key one here is the simulated clock tick.  The simulated VAX has a clock tick of 10ms.  Idling works well when the host OS can sleep with granularity smaller than 10ms.  It can still work if the host OS can sleep with granularity of 10ms, but the simulated OS will probably see significant clock drift.  If the host OS can't sleep with granularity of 10ms or less, then simh doesn't offer idling and you see the "command not allowed" response.  The granularity which is needed is NOT the units which can be specified in a call to nanosleep(or some other mechanism), but the actual amount of wall clock time which elapses when a call to sleep(1ms) is executed.  The idle initialization code in SIMH 3.9-0 explicitly attempts a number of such sleep operations and uses the measured elapsed time to determine the host's sleep resolution value.  Using simh 3.9-0 you should be able to determine the value which was measured by:

         sim> SHOW -D THROT
         Throttling disabled
         Wait rate = 1 ms
         sim>

Some OS environments (windows) allow user mode programs to dynamically change the OS clock tick size (down to 1ms).  On windows, simh leverages this capability.  Most other OS environments don't allow any dynamic changing of the host tick size, but they may provide boot time or other ways to influence the kernel's tick size.  How you do this on any particular platform is up to you.  If you find a way to do this for FreeBSD (9.0-RELEASE), let the list know so others may benefit in the future....

Good Luck,

- Mark Pizzolato




More information about the Simh mailing list