Option b

The Gateway to Computer Science Excellence

0 votes

+1

Design 1 is direct cache with 8 lines so

K mod 8=I

0mod 8=0 (miss)

3 mod 8=3 (miss)

14 mod 8=6 (miss)

11 mod 8=3 (miss)

4mod 8 =4 (miss)

11 (hit)

8mod 8=0(miss)

0mod8=0 (miss)

Miss penalty=8 cycles

Total miss=7

So total cache miss penalties =8*7=56

K mod 8=I

0mod 8=0 (miss)

3 mod 8=3 (miss)

14 mod 8=6 (miss)

11 mod 8=3 (miss)

4mod 8 =4 (miss)

11 (hit)

8mod 8=0(miss)

0mod8=0 (miss)

Miss penalty=8 cycles

Total miss=7

So total cache miss penalties =8*7=56

+1

Design 2 is set associative cache

No of sets=8/2=4

I.e. 4 sets with 2 lines each set

I=K Mod 4

0mod 4=0 (miss)

3mod 4=3 (miss)

14 mod4 =2 (miss)

11 mod 4=3 (miss)

4mod 4=0 (miss)

11mod 4=3 (hit)

8mod 4=0(miss)

0 mod 4=0 (miss)

Total miss=7

Penalty on each miss=10 cycles

Total cache miss penalty =10*7=70 cycles

No of sets=8/2=4

I.e. 4 sets with 2 lines each set

I=K Mod 4

0mod 4=0 (miss)

3mod 4=3 (miss)

14 mod4 =2 (miss)

11 mod 4=3 (miss)

4mod 4=0 (miss)

11mod 4=3 (hit)

8mod 4=0(miss)

0 mod 4=0 (miss)

Total miss=7

Penalty on each miss=10 cycles

Total cache miss penalty =10*7=70 cycles

- All categories
- General Aptitude 1.9k
- Engineering Mathematics 7.4k
- Digital Logic 2.9k
- Programming and DS 4.9k
- Algorithms 4.4k
- Theory of Computation 6.2k
- Compiler Design 2.1k
- Databases 4.1k
- CO and Architecture 3.4k
- Computer Networks 4.1k
- Non GATE 1.4k
- Others 1.7k
- Admissions 595
- Exam Queries 576
- Tier 1 Placement Questions 23
- Job Queries 72
- Projects 17

50,666 questions

56,170 answers

193,842 comments

94,048 users