Unix Programming - Re: t1 for task-1; t2 for task-2; Non-MT process takes t1+t2; Will

This is Interesting: Free IT Magazines  
Home > Archive > Unix Programming > August 2006 > Re: t1 for task-1; t2 for task-2; Non-MT process takes t1+t2; Will





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 Re: t1 for task-1; t2 for task-2; Non-MT process takes t1+t2; Will
Martin James

2006-08-25, 1:26 pm

qazmlp1209@rediffmail.com wrote:
> 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.


Assuming these 'processings' are CPU intensive, ie. make no blocking
calls, neglecting the minimal overhead of possible context-switches,
neglecting any other loadings in the box and assuming that the two
'processings' operate on different data, negelcting any time spent on
splitting up a task into 'processings' then I would expect that the time
taken would be inversely proportional to the number of processors.

Rgds,
Martin







Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com