COMPUTER SYSTEMS&MOD MSGT/ET SA AC PKG
COMPUTER SYSTEMS&MOD MSGT/ET SA AC PKG
3rd Edition
ISBN: 9780134671123
Author: Bryant
Publisher: PEARSON
Expert Solution & Answer
Book Icon
Chapter 6.4, Problem 6.9PP

Explanation of Solution

Cache Addressing:

The primary storage hierarchy contains cache lines that are grouped into sets. If each set contains k lines then we say that the cache is k-way associative.

A data request has an address specifying the location of the requested data. Each cache-line sized chunk of data from the lower level can only be placed into one set. The set that it can be placed into depends on its address.

The number of cache sets is equal to the number of cache blocks divided by the number of ways of associativity.

Number of tag bits = (address _bit _length ) - (exponent _of_ index )  (exponent _of _offset)

The least significant bits are used to determine the block offset.

For example:

One needs to consider the following set associative (S, E, B, m) = (8, 4, 4, 13). The derived value will be as follows:

The Index (CI):

s=log2(S)   =log2(23) = 3 log2(2) = 3

The block off set (CO):

s = log2(B) = log2(22) = 2 log2(2) = 1

The tag bit (CT):

t = m - (s + b) = 13 - (3 + 2) = 13 - 5 = 8

Hence, the “2” lower bits are block offsets (CO); followed by 3 sets of bit index (CI) and the remaining bits are tag bits (CT).

The following table gives the parameters for a number of different caches and the number of cache sets(S), tag bits(t), set index bits (s) and block offset bits (b) are defined.

CachemCBEStsb
1321024412562282
232102484322453
3321024323212705

The values for the above table are described below:

For cache-1:

It is given that B=4,E=1, C=1024 and m=32.

Hence:

S=(cache_memory)/(B×E)=(1024)/(4×1)=256

s=log2(S)  =log2(256) = log2(28) = 8 log2(2) = 8

b =log2(B)=log2(4)=2

t = m - (s + b) = 32- (8 + 2) = 32-10 = 22

For cache-2:

It is given that B=8, E=4,C=1024 and m=32

Blurred answer
Students have asked these similar questions
Unit 1 Assignment 1 – Loops and Methods (25 points) Task: You are working for Kean University and given the task of building an Email Registration System. Your objective is to generate a Kean email ID and temporary password for every new user. The system will prompt for user information and generate corresponding credentials. You will develop a complete Java program that consists of the following modules: Instructions: 1. Main Method: ○ The main method should include a loop (of your choice) that asks for input from five users. For each user, you will prompt for their first name and last name and generate the email and password by calling two separate methods. Example о Enter your first name: Joe Enter your last name: Rowling 2.generateEmail() Method: This method will take the user's first and last name as parameters and return the corresponding Kean University email address. The format of the email is: • First letter of the first name (lowercase) + Full last name (lowercase) +…
I have attached my code, under I want you to show me how to enhance it and make it more cooler and better in graphics with following the instructions.
Using R language
Knowledge Booster
Background pattern image
Recommended textbooks for you
Text book image
C++ for Engineers and Scientists
Computer Science
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Course Technology Ptr
Text book image
Systems Architecture
Computer Science
ISBN:9781305080195
Author:Stephen D. Burd
Publisher:Cengage Learning
Text book image
Enhanced Discovering Computers 2017 (Shelly Cashm...
Computer Science
ISBN:9781305657458
Author:Misty E. Vermaat, Susan L. Sebok, Steven M. Freund, Mark Frydenberg, Jennifer T. Campbell
Publisher:Cengage Learning
Text book image
C++ Programming: From Problem Analysis to Program...
Computer Science
ISBN:9781337102087
Author:D. S. Malik
Publisher:Cengage Learning
Text book image
Principles of Information Systems (MindTap Course...
Computer Science
ISBN:9781285867168
Author:Ralph Stair, George Reynolds
Publisher:Cengage Learning
Text book image
A+ Guide to Hardware (Standalone Book) (MindTap C...
Computer Science
ISBN:9781305266452
Author:Jean Andrews
Publisher:Cengage Learning