The Gateway to Computer Science Excellence
First time here? Checkout the FAQ!
x
+2 votes
765 views
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
asked in Operating System by (87 points) | 765 views

1 Answer

+4 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
answered by Veteran (14.6k points)
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}

Related questions



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

32,544 questions
39,231 answers
109,311 comments
36,613 users