On 13 Mar 2013, at 15:43, "Mark Pizzolato - Info Comm" <Mark at
infocomm.com> wrote:
On Wednesday, March 13, 2013 at 12:11 PM, Cory Smelosky wrote:
On 13 Mar 2013, at 15:04, "Mark Pizzolato - Info Comm" <Mark at
infocomm.com> wrote:
On Wednesday, March 13, 2013 at 11:51 AM, Cory Smelosky wrote:
Speaking of SIMH on Solaris and similar...is SIMH capable of SET CPU IDLE in
zones on SPARC? It looks like 3.9-0 can't.
[...]
Idling for any simulator requires that the host system's clock tick be <= the size
of the
simulated system's clock tick. VAX systems have a clock tick of 10ms.. Idling for
simulated VAX systems works best if the host clock tick is 1ms.
Windows systems have a user mode programmatically settable clock tick size (a facility
useful for some media playback capabilities). On Windows systems simh will set the
host's clock tick to 1ms while a simulator is running.
We haven't seen programmatically settable host clock tick sizes on other platforms.
In general, other platforms have a tick size which can be changed in some system specific
way (which might require building a kernel with a desired tick size) or not changeable
at
all. This issue comes up often enough that adding how to make these system specific
adjustments would be a useful addition to the simh FAQ. Any feedback on this subject
will be welcome.
Ahhh.
"Solaris timing uses a real-time clock that can generate interrupts at a resolution
bound by
the processor speed. For scheduling purposes, it fires every 10 milliseconds. As in Linux,
this is a clock "tick." Note that 2.6 Linux uses a 1000-tick/second clock, as
opposed to the
100-tick/second clock used by Solaris and by previous versions of Linux. User-level
programs
on Solaris can program the real time clock to fire at nanosecond granularity, rounded up
by processor time--much finer than the clock tick granularity of ten or one milliseconds.
However, the program interface to use the high-resolution timers is not visible in the
DDI/DKI. See clock_settime(3rt) for user-level details andusr/src/uts/common/os/cyclic.c
for details on high-resolution timing in Solaris.
Also note that in Solaris, you can change the value of hz or clock ticks/second by setting
hires_tick to 1 and hires_hz to the desired time in the /etc/system file. The default is
1000 ticks per second. Here's an example:
set hires_tick=1
set hires_hz=10000 <~--- 10000 ticks per second"
Looks like Solaris can set it in user mode, too.
This 'documented' tick rate would seem to meet simh's requirements without any
adjustments.
Does the current simh code work? If not, what does it think the tick size is?
I will tell you once I work around ld: fatal: auxiliary filter option (-f, --auxiliary) is
only available when building a shared object
ld: fatal: flags processing errors
;)
Changing the values in /etc/system may be a 'user mode' activity, but it would
certainly have to be done as root, and any such changes won't take effect until after
the system is rebooted, so this is a 'faq' piece of information not something
we'd add to the simulator code dynamically.
If coding is necessary to get this working more cleanly, then contact me offline and we
can come up with a working model and merge it into the code base.
Thanks.
- Mark Pizzolato