Amdahl's Law Read about Amdahl's Law in Section 1.10 of our textbook (5th edition) and use this law to solve the following problem. Problem Consider a computer that executes an Assembly program in 2 minutes. The program consists of various arithmetic and logical operations. Assume that the addition operation is responsible for 30% of the execution time. Answer the following questions: 1. How much we should improve the speed of addition if we want the program to run two times faster? 2. How much we should improve the speed of addition if we want the program to run 10% faster? 3. If we improve the speed of addition by 3 times, by how much the execution time of the program improves?
Added by Philip C.
Close
Step 1
According to Amdahl's Law, the speedup of a program is limited by the fraction of the program that cannot be improved. In this case, the addition operation is responsible for 30% of the execution time, so the fraction that cannot be improved is 0.3. To make the Show more…
Show all steps
Your feedback will help us improve your experience
Akash M and 58 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
Consider an architecture that has four types of instructions: additions, multiplications, memory operations, and branches. The following table gives the number of instructions that belong to each type in a program, the number of cycles it takes to execute each instruction of that type, and the speedup in execution of that instruction type from a proposed improvement. a. What is the fraction of execution time for each type of instructions? b. What is the value of CPI? c. Using part a, determine and rank the overall speedups for the proposed improvements (from high to low). Instruction Type Inst. Count (in million) Inst. Execution Time (in Cycles) Speedup of Instruction Type Addition 10 2 2.0 Multiplication 30 20 1.3 Memory 35 10 3.0 Branch 15 4 4.0
Sri K.
Consider program P, which runs on a 1GHz machine M in 10 seconds. An optimization is made to P, replacing all instances of multiplying a value by 4 (mult X, X, 4) with two instructions that set x = x + x twice. Call this new optimized program, P'. The CPI of a multiply instruction is 4, and the CPI of an 'add' is 1. After recompiling, the program now runs in 9 seconds on machine M. How many multiplies were replaced by the new compiler?
Shaiju T.
1.5 [4] <1.6> Consider three different processors Pl, P2, and P3 executing the same instruction set. Pl has a GHz clock rate and CPI of 15. P2 has a 2.5 GHz clock rate and CPI of 1.0. P3 has a 4.0 GHz clock rate and a CPI of 2.2. Which processor has the highest performance expressed in instructions per second? b. If the processors each execute the program in 10 seconds, find the number of cycles and the number of instructions: We are trying to reduce the execution time by 309 but this leads to an increase of 209 in the CPI. What clock rate should we have to get this time reduction?
Animesh R.
Recommended Textbooks
Computer Science and Information Technology
Introduction to Programming Using Python
Computer Science - An Overview
Transcript
Watch the video solution with this free unlock.
EMAIL
PASSWORD