proggrammer
August 9th, 2012, 10:45 PM
Suppose I want to create threads for a task, what if it is done by a single thread?
Is it true that multi-thread will do the same job in less time? I could never catch that argument, in what case it does, in what cases it doesn't?
What if I have 'm' cores, then what should be the optimized number of threads which will give the most efficient execution with respect of time.
What are the factors I need to think of, I need a mathematical and rational reasoning.
Does it depend on OS? for example how many should I for linux? for ubuntu? for windows xp?
If there is any conceptual technique to decide that, please help me with your knowledge or pointer to the same.
So if I decide that n number of threads will be best in terms of optimised time execution, so when should I check or decide to create another thread..
the problem is I can repeatedly check it for a constant time, or I can fire the creation only when one thread is dying. Help me it to visualize in C.
So If I prefer the second way, is there anyway in c or java when I can fire that. Any googleable term will also be helpful. Another problem is, I may not know how much the machine is loaded, will number of thread should depend on that?
I know my language is bad, so harse, but truth is for me knowledge is love. Thanks in advance.
Is it true that multi-thread will do the same job in less time? I could never catch that argument, in what case it does, in what cases it doesn't?
What if I have 'm' cores, then what should be the optimized number of threads which will give the most efficient execution with respect of time.
What are the factors I need to think of, I need a mathematical and rational reasoning.
Does it depend on OS? for example how many should I for linux? for ubuntu? for windows xp?
If there is any conceptual technique to decide that, please help me with your knowledge or pointer to the same.
So if I decide that n number of threads will be best in terms of optimised time execution, so when should I check or decide to create another thread..
the problem is I can repeatedly check it for a constant time, or I can fire the creation only when one thread is dying. Help me it to visualize in C.
So If I prefer the second way, is there anyway in c or java when I can fire that. Any googleable term will also be helpful. Another problem is, I may not know how much the machine is loaded, will number of thread should depend on that?
I know my language is bad, so harse, but truth is for me knowledge is love. Thanks in advance.