A program runs on computer a with a 2 ghz clock in 10 seconds. another computer b with 4 ghz run this program in 6 seconds. to accomplish this, computer b will require p times as many clock cycles as computer a to run the program. find the value of p.
Answers
Answered by
3
Let C = number of cycles
Execution time = C x clock cycle time = C/ clock rate
For Computer A, Time 10s = total cycles x (1/4GHz)
For Computer B, Time 6s = 1.2 x total cycles x (1/clock rate)
10/6 = clock rate/(1.2 x 4GHz)
Therefore, Clock rate = 8GHz
Execution time = C x clock cycle time = C/ clock rate
For Computer A, Time 10s = total cycles x (1/4GHz)
For Computer B, Time 6s = 1.2 x total cycles x (1/clock rate)
10/6 = clock rate/(1.2 x 4GHz)
Therefore, Clock rate = 8GHz
Similar questions