flat assembler
Message board for the users of flat assembler.

Index > Heap > Multitasking Problem

Author
Thread Post new topic Reply to topic
Furby



Joined: 01 May 2007
Posts: 74
Location: Kraków, Poland
Furby
I have a problem

In my program i split iteration of a loop to 2 , 4 , 8 , 16 threads....

the iteration count is always 160 but on my Intel Core 2 Duo (2 cores ;O )

4 thread version is faster then 2 thread ;/

Anyone knows the problem ?

OS: windows

_________________
[AGH] Where is the Polish section ?
Ludu czemu asm jest taki trudny ;/ ?
Post 13 Jan 2008, 10:19
View user's profile Send private message Reply with quote
Madis731



Joined: 25 Sep 2003
Posts: 2140
Location: Estonia
Madis731
Thread scheduling... nothing more. 4 are scheduled more tightly between other applications running in the background.

If you have ONLY your 2 threads and in REAL-TIME priority, then this anomaly shouldn't happen.
Post 13 Jan 2008, 15:19
View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 17332
Location: In your JS exploiting you and your system
revolution
I have often found that an optimal number of threads for an app that is the only program running is N+1 where N is the number of cores available. With two or more apps both fighting for CPU time then each aiming for ceil[(N+1)/M] is best, where M is the number of apps.
Post 14 Jan 2008, 11:27
View user's profile Send private message Visit poster's website Reply with quote
Vov4ik



Joined: 20 May 2007
Posts: 28
Location: USSR, Moscow Region
Vov4ik
N+1 thread, where N threads do computations and one thead controls others. Is this right?
Post 14 Jan 2008, 18:12
View user's profile Send private message ICQ Number Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 17332
Location: In your JS exploiting you and your system
revolution
Vov4ik wrote:
N+1 thread, where N threads do computations and one thead controls others. Is this right?
I was meaning N+1 threads doing the work. Other non-worker threads are not included in N+1.
Post 14 Jan 2008, 18:28
View user's profile Send private message Visit poster's website Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Copyright © 1999-2020, Tomasz Grysztar. Also on YouTube, Twitter.

Website powered by rwasa.