The Gateway to Computer Science Excellence
+3 votes
Consider two processors P1 and P2 executing the same instruction set. Assume that under identical conditions, for the same input, a program running on P2 takes 25% less time but incurs 20% more CPI (clock cycles per instruction) as compared to the program running on P1. If the clock frequency of P1 is 1GHz, then the clock frequency of P2 (in GHz) is _________.

please do explain also
in Operating System by | 1.3k views

1 Answer

+5 votes
Total execution time, E = No. of instructions executed( #I) $\times$ CPI / clock frequency (F)
$E_{P2} = 0.75 \times E_{P1}$

$\implies 0.75 \times \#I_{P1} \times CPI_{P1} / F_{P1} =  \#I_{P2} \times CPI_{P2}/F_{P2} $

$\implies 0.75 \times \#I_{P1} \times CPI_{P1} / F_{P1} =  \#I_{P1} \times 1.2 \times CPI_{P1}/F_{P2} $

$\implies 0.75 \times F_{P1} = 1.2 /F_{P2} $

$\implies F_{P2} = 1.2 /(0.75 \times F_{P1}) $

$\implies F_{P2} =   1.2 /(0.75 \times 1)  = 1.6$ GHz
edited by
The answer is correct except for the fact that the first line is wrong it should be E_{p2}=0.75*E{p1}
Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true
52,345 questions
60,497 answers
95,318 users