For Programmers: Free Programming Magazines  


Home > Archive > Unix Programming > August 2006 > t1 for task-1; t2 for task-2; Non-MT process takes t1+t2; Will MT process take max of









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author t1 for task-1; t2 for task-2; Non-MT process takes t1+t2; Will MT process take max of
qazmlp1209@rediffmail.com

2006-08-25, 4:00 am

Assume the processing-1 takes 10 ms and processing-2 takes 10 ms.
Processing-1 and processing-2 can be done independantly.
If I have a process with only a main thread, it takes 20 ms to finish
the processing-1 and processing-2 in sequence. Now, I want to switch it
to a multithreaded process, where the thread-1(i.e. the main thread)
will do the processing-1 and thread-2 will perform the processing-2.
How much time now the process is expected to take?
Will it be 10 ms, or slightly more than in the range of 11-19
ms(considering the time required for context-switching between
threads)?

I understand that this depends on various factors like the number of
CPUs etc.. But, I would like to know the typical time that we can
expect.

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com