The Gateway to Computer Science Excellence

First time here? Checkout the FAQ!

x

+2 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

please do explain also

+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

$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

- All categories
- General Aptitude 1.3k
- Engineering Mathematics 5.2k
- Digital Logic 2k
- Programming & DS 3.7k
- Algorithms 3.2k
- Theory of Computation 4k
- Compiler Design 1.6k
- Databases 3k
- CO & Architecture 2.6k
- Computer Networks 3k
- Non GATE 1k
- Others 1.3k
- Admissions 488
- Exam Queries 436
- Tier 1 Placement Questions 18
- Job Queries 56
- Projects 9

36,204 questions

43,662 answers

124,117 comments

42,948 users