Suppose you program an app with two compute-intensive tasks that run on one core of a dual-core system. Then, suppose you program the app so that the two compute-intensive tasks run asynchronously in separate threads on a dual-core system. Should you expect the latter program to run in half the time? Why?
What will be an ideal response?
No. There’s overhead inherent in using threads to perform separate tasks. Simply
performing the tasks asynchronously on a dual-core system does not complete the
tasks in half the time, though they’ll often run faster than if you perform the tasks in
sequence.
You might also like to view...
?Read the following sentence and key the correct terminal punctuation mark in the blank.How does the defibrillator work _____
Fill in the blank(s) with the appropriate word(s).
If you specified ____ for a column when you created a table, then changing a value in a column to null is prohibited.
A. NOT NULL B. NULL C. CHAR D. NUMBER
When you sort records, you separate out the records that meet a certain criteria and include only those records in the merge. _________________________
Answer the following statement true (T) or false (F)
A program should compute two times x. Which statement has a logic error?
a. y = x + x; b. y = x * x; c. y = 2 * x; d. y = x * 2;