cpu indicator on smp

bridged with qdn.public.qnxrtp.os
Post Reply
Dmitry

cpu indicator on smp

Post by Dmitry » Thu Sep 28, 2000 6:04 pm

I changed kernel to support smp systems and I see two CPU indicators on
desktop.
My question is why in any cases CPU indicators show the same value on CPU 1
and CPU 2?

MB - ASUS P2B-DS
CPU 2 - PII 333
Thanks,
Dmitry

Guest

Re: cpu indicator on smp

Post by Guest » Thu Sep 28, 2000 9:16 pm

Dmitry <dpavlushko@hotmail.com> wrote:
I changed kernel to support smp systems and I see two CPU indicators on
desktop.
My question is why in any cases CPU indicators show the same value on CPU 1
and CPU 2?

MB - ASUS P2B-DS
CPU 2 - PII 333
Thanks,
Dmitry

The `S' in SMP stands for symmetrical. The operating system is _supposed_
to blaance the load equally between the two.

Dmitry

Re: cpu indicator on smp

Post by Dmitry » Fri Sep 29, 2000 4:39 pm

Dmitry <dpavlushko@hotmail.com> wrote:
I changed kernel to support smp systems and I see two CPU indicators on
desktop.
My question is why in any cases CPU indicators show the same value on
CPU 1
and CPU 2?

MB - ASUS P2B-DS
CPU 2 - PII 333
Thanks,
Dmitry



The `S' in SMP stands for symmetrical. The operating system is _supposed_
to blaance the load equally between the two.
Try this example:
int main(void)
{
ThreadCtl(_NTO_TCTL_RUNMASK, 0x01); <<<--------------- play with this
mask
while (1)
{
do something heavy
}
}
It seems CPU indicators lie.
Your answer doesn't explain aforementioned example for which (I suppose)
indicators have to show different load.
Thanks,
Dmitry

Guest

Re: cpu indicator on smp

Post by Guest » Fri Sep 29, 2000 6:08 pm

Dmitry <dpavlushko@hotmail.com> wrote:
Dmitry <dpavlushko@hotmail.com> wrote:

Try this example:
int main(void)
{
ThreadCtl(_NTO_TCTL_RUNMASK, 0x01); <<<--------------- play with this
mask
while (1)
{
do something heavy
}
}

It seems CPU indicators lie.

Your answer doesn't explain aforementioned example for which (I suppose)
indicators have to show different load.
Are you saying that if you do this, your CPU meters are still symmetrical?

Are you saying that if you do this they are not symmetrical?

If you run this application as root, the the ThreadCtl should succed, and
your application should be limited to running on one processor. If you
aren't root, then I don't think the ThreadCtl will succeed, and your
app will be scheduled on any available processor.

Check the error code return from ThreadCtl for EPERM

Post Reply

Return to “qdn.public.qnxrtp.os”