Computer Systems: A Programmer's Perspective (3rd Edition)
3rd Edition
ISBN: 9780134092669
Author: Bryant, Randal E. Bryant, David R. O'Hallaron, David R., Randal E.; O'Hallaron, Bryant/O'hallaron
Publisher: PEARSON
expand_more
expand_more
format_list_bulleted
Question
Chapter 6.4, Problem 6.11PP
A.
Program Plan Intro
Given Information:
A hypothetical cache that uses the high order “s” bits of an address as the set index is given. For such a cache, the contiguous chunks of memory blocks are mapped to the same cache sets.
B.
Program Plan Intro
Given Information:
The following code is given:
//traverse the array
for(i=0;i<4096;i++)
{
//add array elements
sum+=array[i];
}
The code runs on a system with cache of the form(S,E,B,m)= (512,1,32,32).
Expert Solution & Answer
Trending nowThis is a popular solution!
Students have asked these similar questions
Computer science
Computer organization subject
m
ofessor,
S.
aw-Hill
tion... V
!!!
ar textbook
As described in COD Section 5.7 (Virtual memory), virtual memory uses a page table to track the mapping of virtual addresses to
physical addresses. This exercise shows how this table must be updated as addresses are accessed. The following data constitute a
stream of virtual byte addresses as seen on a system. Assume 4 KiB pages, a four-entry fully associative TLB, and true LRU
replacement. If pages must be brought in from disk, increment the next largest page number.
TLB
Page Table
Decimal 4669 2227 13916 34587 48870 12608 49225
hex 0x123d 0x08b3 0x365c 0x871b Oxbee6 0x3140 0xc049
Valid
1
1
1
0
Index
0
1
2
3
4
5
(a) For each access shown above, list
6
7
8
9
a
b
Tag
Oxb
Ox7
0x3
0x4
Valid
1
0
0
1
1
1
0
1
0
0
1
1
▪ whether the access is a hit or miss in the TLB,
▪ whether the access is a hit or miss in the page table,
▪ whether the access is a page fault,
the updated state of the TLB.
Physical Page
Number
12
4
6
9
Time Since Last
Access
4…
6
Chapter 6 Solutions
Computer Systems: A Programmer's Perspective (3rd Edition)
Ch. 6.1 - Prob. 6.1PPCh. 6.1 - Prob. 6.2PPCh. 6.1 - Prob. 6.3PPCh. 6.1 - Prob. 6.4PPCh. 6.1 - Prob. 6.5PPCh. 6.1 - Prob. 6.6PPCh. 6.2 - Prob. 6.7PPCh. 6.2 - Prob. 6.8PPCh. 6.4 - Prob. 6.9PPCh. 6.4 - Prob. 6.10PP
Ch. 6.4 - Prob. 6.11PPCh. 6.4 - Prob. 6.12PPCh. 6.4 - Prob. 6.13PPCh. 6.4 - Prob. 6.14PPCh. 6.4 - Prob. 6.15PPCh. 6.4 - Prob. 6.16PPCh. 6.5 - Prob. 6.17PPCh. 6.5 - Prob. 6.18PPCh. 6.5 - Prob. 6.19PPCh. 6.5 - Prob. 6.20PPCh. 6.6 - Prob. 6.21PPCh. 6 - Prob. 6.22HWCh. 6 - Prob. 6.23HWCh. 6 - Suppose that a 2 MB file consisting of 512-byte...Ch. 6 - The following table gives the parameters for a...Ch. 6 - The following table gives the parameters for a...Ch. 6 - Prob. 6.27HWCh. 6 - This problem concerns the cache in Practice...Ch. 6 - Suppose we have a system with the following...Ch. 6 - Suppose we have a system with following...Ch. 6 - Suppose that a program using the cache in Problem...Ch. 6 - Repeat Problem 6.31 for memory address0x16E8 A....Ch. 6 - Prob. 6.33HWCh. 6 - Prob. 6.34HWCh. 6 - Prob. 6.35HWCh. 6 - Prob. 6.36HWCh. 6 - Prob. 6.37HWCh. 6 - Prob. 6.38HWCh. 6 - Prob. 6.39HWCh. 6 - Given the assumptions in Problem 6.38, determine...Ch. 6 - You are writing a new 3D game that you hope will...Ch. 6 - Prob. 6.42HWCh. 6 - Prob. 6.43HWCh. 6 - Prob. 6.45HWCh. 6 - Prob. 6.46HW
Knowledge Booster
Similar questions
- a) A block-set associative cache memory consists of 128 blocks divided into four block sets. The main memory consists of 32,768 blocks and each block contains 512 eight-bit words (1) How many bits are required for addressing the main memory? (ii) How many bits are needed to represent the TAG SET and WORD fields? b) Write a program to code the equation X=(A+B)L| ((C+D) using one-address instructions. Please solve only the b partarrow_forward4arrow_forwardQ3) A computer system has 1 Mbyte of main memory, 16 bytes block size, and 64 Kbytes cache memory. a. For the main memory addresses of CABBE, 01234, and, FO010 find tag, cache line address, and word offsets for a direct- mapped cache. b. Give any two main memory addresses with different tags that map to the same cache slot for direct-mapped cache.c. For the main memory addresses of CABBE and, FO010 find tag and word offset values for a fully-associative cache. d. For the main memory addresses of CABBE and, FO010 find tag, cache set, and word offset values for a two-way set- associative cache.arrow_forward
- i need the answer quicklyarrow_forwardpls solve it pls dont say anymore uh-oh ı need solve of itarrow_forward6.40 Given the assumptions in Problem 6.38, determine the cache performance of the following code: for (1 = 0; i < 16; i++) { for (j = 0; j < 16; j++) { square [1] [j].y = 1; 1 2 3 4 0; i < 16; i++) { for (j - 0; j < 16; j++) { square [i] [j].c square [i] [j).m = 0; 0; 6 for (i 7 8 9 10 square[i] [j].k 11 12 A. What is the total number of writes? B. What is the total number of writes that miss in the cache? C. What is the miss rate?arrow_forward
- c) On a machine with 32-bit words and 32-bit addresses, suppose the cache is an 16MB 8-way set-associative cache, with 8-word cache lines. Indicate how an address would be partitioned into fields to allow a single word to be fetched from the cache by the CPU (just indicate what the fields are, the order of the flelds in the address, and how each field is). Show many bits your work.arrow_forwardProgramming Language Pragmatics, 4th Editionarrow_forwardAVE THE CITY UNIVERSITY OF NEW YORK 4. (30%) We will be implementing a new instruction within the MIPS architecture. New instruction will decrement a Variable stored in a memory location and store the decremented value in a register (Rt). This new instruction will be called DECR. Its usage and interpretation is Usage: DECR Offset(4*Rs),Rt Interpretation:. Reg[Rt]= Mem[4*Rs+Offset] -1 Which blocks are used and which control signals are generated for this instruction. How would the Instrùction code fields look like ? Do we need to add an extra hardware logic, explain ? (You may draw a simplified datapath flow)arrow_forward
- Assembly language. Pls answer only if you had knowledge. Thanks.arrow_forward) Consider the following memory management allocation scenario at time t:arrow_forwardThis problem tests your ability to predict the cache behavior of C code. You are given the following code to analyze:1 int x[2][128]; 2 int i;3 int sum = 0;45 for (i = 0; i < 128; i++) {6 sum += x[0][i] * x[1][i];7 }Assume we execute this under the following conditions:sizeof(int) = 4.Array x begins at memory address 0x0 and is stored in row-majororder.In each case below, the cache is initially empty.The only memory accesses are to the entries of the array x . Allother variables are stored in registers.Given these assumptions, estimate the miss rates for the followingcases:A. Case 1: Assume the cache is 512 bytes, direct-mapped, with16-byte cache blocks. What is the miss rate?B. Case 2: What is the miss rate if we double the cache size to1,024 bytes?C. Case 3: Now assume the cache is 512 bytes, two-way setassociative using an LRU replacement policy, with 16-bytecache blocks. What is the cache miss rate? D. For case 3, will a larger cache size help to reduce the missrate? Why or why…arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education
Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education
Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON
C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning
Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education