[Coco] CPU utilization calculation in NitrOS-9

Alex Evans varmfskii at gmail.com
Mon Jan 25 23:22:52 EST 2021


Just waiting, not waiting for I/O. If you run completely CPU bound
processes, they will push up the load, but processes that are delayed
by I/O can also push up the load.

On Mon, Jan 25, 2021 at 6:12 PM Jeff Teunissen <deek at d2dc.net> wrote:
>
> Actually, I seem to recall "load" means the average number of processes
> waiting on I/O over 5/10/15 minutes.
>
> On Mon, Jan 25, 2021, 10:27 AM Johann Klasek <johann+coco at klasek.at> wrote:
>
> > On Mon, Jan 25, 2021 at 04:15:25AM -0500, Jeff Teunissen wrote:
> > > On Sun, Jan 24, 2021 at 9:00 PM William Carlin <whcarlinjr at gmail.com>
> > wrote:
> > [..]
> > > 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".
> >
> > However in OS theory the utilization of a system does not depend on what
> > the system (kernel) is doing during "idle time". Idle has the meaning of
> > time not consumed by any task for a given interval. There is no
> > difference if the CPU is an old or of some modern kind.
> > It should represent the ratio of the time user tasks consume (including
> > system overhead like context switch time) to the whole duration of a
> > given interval. It can be imagined if there would be an explicit lowest
> > priority idle task, with runs only if no other task has to do anything,
> > even though this idle task is permanently busy with system
> > housekeeping...
> >
> > For instance, Unix defines the "load" with the avarage number of
> > processes which are in "running" state for a given interval. 0 means the
> > there no process needs the CPU even though the system is working on its
> > internal datastructures. With load of 1 the CPU is saturated, everything
> > above 1 means that more processes are waiting for the CPU than the CPU
> > can actual handle.
> >
> > Would it be possible to collect such information (the length of the
> > kernel's active-task-queue and the time reference if this value is
> > changing)? I think this has to be a part of the scheduler itself, but
> > AFAIK OS-9 Level I or II does not provide such information.
> >
> >
> > --
> > Coco mailing list
> > Coco at maltedmedia.com
> > https://pairlist5.pair.net/mailman/listinfo/coco
> >
>
> --
> Coco mailing list
> Coco at maltedmedia.com
> https://pairlist5.pair.net/mailman/listinfo/coco


More information about the Coco mailing list