We developed a small test program, called SMPtest, to find out the number of
threads that can execute simultaneously on a given machine.
The output we see from SMPtest on a x86 SMP machine running a 6.2.1 NC QNX
SMP kernel looks erratic to us.
We expect the output of our program to remain constant while the number of
threads is lower than or equal to the number of CPU’s, and increase linearly
in the number of threads otherwise.
The output we see however is this:
1 threads finished in 1.345794 sec
2 threads finished in 1.346794 sec
3 threads finished in 2.047686 sec
4 threads finished in 3.319492 sec
5 threads finished in 3.381483 sec
6 threads finished in 4.099373 sec
7 threads finished in 5.316186 sec
8 threads finished in 5.417171 sec
9 threads finished in 6.114064 sec
10 threads finished in 7.317881 sec
11 threads finished in 7.408866 sec
12 threads finished in 8.156752 sec
13 threads finished in 9.296577 sec
14 threads finished in 9.424558 sec
15 threads finished in 10.149447 sec
The machine contains 2 CPU’s. The numbers are as expected for 1, 2, 3, 5, 6,
8, 9, 11, 12, 14 and 15. They are not as expected for 4, 7, 10, 13. Notice
it takes almost as long to execute 4 threads as it takes to executes 5!
We suspect there is some bug in the kernel’s thread scheduling that only
shows up for (4 + 3*n) threads running simultaneously.
You can download the source code from
Is this a know issue and are there any patches available for this?
- Dual Xeon 2.8GHz
- Hyperthreading turned of
- 1GB RAM
- Installed from the Non-commercial downloadable ISO image (QNX Neutrino
6.2.1) and enabled the SMP kernel.
– dr. ir. Pieter LiefoogheDoctor AssistantVrije Universiteit Brussel (VUB)
INFO/TWTele.Com GroupPleinlaan 21050 BrusselPhone: +32-2-6292977Fax: