Read "The Free Lunch is Over" article to answer the following questions. This article is on Canvas Introductory papers and is also available online here: http://www.gotw.ca/publications/concurrency-ddj.htm. Q1. Why does Herb Sutter not think highly of the hyperthreading feature in CPUs? Q2. What does Herb Sutter want to explain when he says "Cache is king"? Q3. What are the problems with concurrent code as mentioned in the article? Q4. Why is a quad-core processor not four times as fast as a single-core system?
Added by Catherine C.
Step 1
Step 1: In the article "The Free Lunch is Over," Herb Sutter does not think highly of the hyperthreading feature in CPUs because it can lead to decreased performance due to resource contention and increased complexity in managing threads. Show more…
Show all steps
Your feedback will help us improve your experience
Akash M and 93 other AP CS educators are ready to help you.
Ask a new question
Labs
Want to see this concept in action?
Explore this concept interactively to see how it behaves as you change inputs.
Key Concepts
Recommended Videos
Q10. CPU Time of an application during the execution is calculated by the following formula: CPU Time = (Instructions / Program) * (Clock cycles / Instruction) * (Seconds / Clock cycle) The are two computers CompA and CompB with 3GHz and 2GHz clock frequencies respectively. These computers are using the same ISA but different compilers. There are two types of instructions in the given ISA, TypeA and TypeB. In the table below, for an application compiled for CompA and CompB, the instruction distribution and number of cycles to execute each type of instruction is given. Find which computer executes the given application faster and what is its speedup compared to the other computer. | | CompA CPI | CompA #instructions | CompB CPI | CompB #instructions | | :--- | :--- | :--- | :--- | :--- | | TypeA | 1 | 50000 | 2 | 60000 | | TypeB | 10 | 10000 | 5 | 1000 |
Akash M.
Consider a multicore processor with four heterogeneous cores labeled A, B, C, and D. Assume cores A and D have the same speed. Core B runs twice as fast as core A, and core C runs three times faster than core A. Assume that all four cores start executing the following application at the same time and no cache misses are encountered in all core operations. Suppose an application needs to compute the square of each element of an array of 256 elements. Assume 1 unit time for core A or D to compute the square of an element. Thus, core B takes 12 unit time and core C takes 13 unit time to compute the square of an element. Given the following division of labor in four cores: Core A: 32 elements Core B: 128 elements Core C: 64 elements Core D: 32 elements a. Compute the total execution time (in time units) for using the four-core processor to compute the squares of 256 elements in parallel. The four cores have different speeds. Some faster cores finish the job and may become idle, while others are still busy computing until all squares are computed. b. Calculate the processor utilization rate, which is the total amount of time the cores are busy (not idle) divided by the total execution time they are using all cores in the processor to execute the above application.
Consider a multi-core processor with heterogeneous cores: A, B, C, and D, where core B runs twice as fast as A, core C runs three times as fast as A, and cores D and A run at the same speed (i.e., they have the same processor frequency, microarchitecture, etc.). Suppose an application needs to compute the square of each element in an array of 256 elements. Consider the following two divisions of labor: (a) Core A 32 elements Core B 128 elements Core C 64 elements Core D 32 elements (b) Core A 48 elements Core B 128 elements Core C 80 elements Core D Unused Compute (1) the total execution time taken in the two cases and (2) cumulative processor utilization (amount of total time the processors are not idle divided by the total execution time). For case (b), if you do not consider Core D in cumulative processor utilization (assuming we have another application to run on Core D), how would it change? Ignore cache effects by assuming that a perfect prefetcher is in operation.
Recommended Textbooks
Computer Science and Information Technology
Introduction to Programming Using Python
Computer Science - An Overview
Transcript
100,000+
Students learning Computer Science with Numerade
Trusted by students at 8,000+ universities
Watch the video solution with this free unlock.
EMAIL
PASSWORD