What is the likely result?

Give: What is the likely result?

Give: What is the likely result?

A.
The program produces the correct result, with similar performance to the original.

B.
The program produces the correct result, with performance degraded to the equivalent of
being single threaded.

C.
The program produces an incorrect result.

D.
The program goes into an infinite loop.

E.
An exception is thrown at runtime.

F.
The program produces the correct result, with better performance than the original.



Leave a Reply 4

Your email address will not be published. Required fields are marked *


bob

bob

The question is missing the following instructions :


if you replace line X by :
return f1.join() + f2.compute() ;

What is likely the result ?

bob

bob

Answer D is wrong.

But the performance decreases a lot (answer B)

dwin

dwin

Why the change will decrease performance????

Juan

Juan

The correct Answer is the B :

The program produces the correct result, with performance degraded to the equivalent of
being single threaded.

if you check the code, you will see that the performance is low