[Coco] CPU utilization calculation in NitrOS-9

Jeff Teunissen deek at d2dc.net
Mon Jan 25 04:15:25 EST 2021


On Sun, Jan 24, 2021 at 9:00 PM William Carlin <whcarlinjr at gmail.com> wrote:
>
> OS-9 / NItrOS-9 Gurus,
>
> Is there any data that can be polled in the NitrOS-9 kernel that can tell
> us about CPU utilization?  For example, I would assume that your most basic
> NitrOS-9 boot with no background daemon processes running (like inetd), no
> other background tasks executing, and only the term shell waiting for input
> would essentially be an idle system.  What kind of information can I glean
> from the kernel task scheduler and the process list that could tell me
> about the CPU utilization of the machine?

I'm not sure your assumption is correct. Unlike more modern CPUs, the
6x09 CPUs don't have low-power or throttling modes, so there's not
really any kind of "idle" state. Even if _all_ the processes have put
themselves to sleep, the kernel scheduler is furiously polling devices
and going through the task list looking for a process to wake up or
run.
You could call that scheduler time "idle" for the purpose of measuring
how much time the processes are being given, but it's not really idle
in the usual sense of "system not doing anything".


More information about the Coco mailing list