PDA

View Full Version : Multi-thread vs. Multicore



TheGrimace
20th September 2007, 15:13
Does the Qt4 multi-thread structure actually take advantage of multiple cores on the same machine? I have noticed that when running a multi-threaded application on Windows vs. Solaris, the processor usage caps at 50% for a dual-core machine on windows, but 100% on Solaris.

wysota
20th September 2007, 15:24
From the application point of view multi-core CPU is visible as two different processing units, so the only difference between using two threaded application on dual-core and dual-cpu is caused by the architecture of the cpu itself and the data flow in the application (of course dual-core will be slower due to smaller computing power per core).

Don't compare processor usage on different systems. Compare execution times instead. In your case I'd say something is wrong with your program or system settings and Windows executes your application on a single core (thus 50% instead of 100%).

marcel
20th September 2007, 15:30
From the application point of view multi-core CPU is visible as two different processing units, so the only difference between using two threaded application on dual-core and dual-cpu is caused by the architecture of the cpu itself and the data flow in the application (of course dual-core will be slower due to smaller computing power per core).

Don't compare processor usage on different systems. Compare execution times instead. In your case I'd say something is wrong with your program or system settings and Windows executes your application on a single core (thus 50% instead of 100%).

Goddamn it. You always get the best threads...
But yes, I'd also say win is running on a single core. Have you tried changing the process affinity from task manager?
Vista runs multiple threads on both cores by default.

wysota
20th September 2007, 15:34
Goddamn it. You always get the best threads...
Sorry :) But I have to admit, I have a handicap because of an experimental plugin running for priviledged users on the forum.

jpn
20th September 2007, 16:36
But I have to admit, I have a handicap because of an experimental plugin running for priviledged users on the forum.
What?! Now you really made us curious about it! :)

akiross
20th September 2007, 18:13
Does the Qt4 multi-thread structure actually take advantage of multiple cores on the same machine?

It's not matter of qt, it's matter of OS' scheduler. Multi thread means that application is *designed* to have pieces of code which are executed in parallel. How it's executed is not (shouldn't be) qt's interest.

wysota
20th September 2007, 19:40
What?! Now you really made us curious about it! :)

Nothing special. Just a quicker way to access new posts.

marcel
20th September 2007, 19:46
Yeah, well if it is something that notifies you in real time that new posts/threads have appeared them we all should have that :).

wysota
20th September 2007, 21:14
Yeah, well if it is something that notifies you in real time that new posts/threads have appeared them we all should have that :).

No, but there is this button labeled "Hide New Posts from JPN and Marcel".

jpn
20th September 2007, 22:15
Look who's got all the bells and whistles! Wysota, so you wrote the automated answering bot too, right? 6.5k posts is no more a wonder! ;)

wysota
20th September 2007, 22:17
Look who's got all the bells and whistles! Wysota, so you wrote the automated answering bot too, right? 6.5k posts is no more a wonder! ;)

Basically I ask half of the questions myself. Thanks to that I know how to answer them. And offtopic discussions such as this one also help in increasing post count quickly. I prefer flame wars though...