Question
You have the choice of buying two processors: Processor 1 has a clock speed of 4.0 GHz with 32 KiB of L1 cache. Processor 2
You have the choice of buying two processors:
Processor 1 has a clock speed of 4.0 GHz with 32 KiB of L1 cache.
Processor 2 has a clock speed of 2.0 GHz with 64 KiB of L1 cache.
In order to decide which to buy, you decide to estimate the time each processor will take to process a program with 10,000 RISC instructions. Each RISC instruction takes one clock pulse to execute once it is in the registers, and has a size of 4 bytes.
- Show that a program consisting of 10,000 RISC instructions will fit into 64 KiB of L1 cache, but will not fit into 32 KiB of L1 cache.
- It takes 1 nanosecond (1 x 10 -9 s) to move an instruction from L1 cache to the registers and 9 nanoseconds to move an instruction from L2 cache to the L1 cache. Assume that for Processor 2, all of the instructions can be found in L1 cache and for Processor 1, all of the instructions that won’t fit in L1 cache can be found in L2 cache. How much time is needed to load all 10,000 instructions into the registers for each processor. Write your answers in seconds, using scientific notation.
- For each processor, calculate the time it takes to execute 10,000 RISC instructions. Write your answers in seconds, using scientific notation.
- Using your results from part (ii) and part (iii), for each processor, calculate the total amount of time to load 10,000 RISC instructors from cache memory to the registers, and then to execute them.
You may assume that no data is needed for this test program. in each case you will only need to calculate the time to move 10,000 instructions into the registers and the time to execute the 10,000 instructions. You will then find the total time for each processor by adding these two values.
Write your answers in seconds, using scientific notation.
Step by Step Solution
3.41 Rating (154 Votes )
There are 3 Steps involved in it
Step: 1
1 Size of each instructions 4bytes Size of 10000 instructions 410000 40000 bytes 39 KB which ...Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started