Would an algorithm that performs several independent calculations concurrently (e.g., matrix multiplication) be more efficient if it used threads, or if it did not use threads? Why is this a hard question to answer?

What will be an ideal response?

The answer to this question depends on the implementation of threads and if the system is a uniprocessor system or a multiprocessor system. If the system is a multiprocessor system, the function using threads might be more efficient if each thread could execute on a separate processor. However, if the system is a uniprocessor system with a user-level library, the function using threads would be less efficient due to the additional overhead incurred by spawning threads and switching contexts between the threads.

Computer Science & Information Technology

You might also like to view...

A bar code reader is an example of an output device

Indicate whether the statement is true or false

Computer Science & Information Technology

Let X be a binomial random variable with mean N p and variance N p(1?p). Show that the ratio X/N also has a binomial distribution with mean p and variance p(1 ? p)/N.

What will be an ideal response?

Computer Science & Information Technology