The system from which this memory dump was produced contains 4 blocks of cache, where each block consists of 8 bytes. Assume that the following sequence of memory addresses takes place: 0x2C, 0x6D, 0x86, 0x29, 0xA5, 0x82, 0xA7, 0x68, 0x80, and 0x2B. a) How many blocks of main memory are there? b) Assuming a direct mapped cache: i. Show the format for a main memory address assuming that the system uses direct mapped cache. Specify field names and sizes. ii. What does cache look like after the 10 memory accesses have taken place? Draw the cache and show contents and tags. iii. What is the hit rate for this cache on the given sequence of memory accesses?

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Topic Video
Question

The system from which this memory dump was produced contains 4 blocks of cache, where each
block consists of 8 bytes. Assume that the following sequence of memory addresses takes place:
0x2C, 0x6D, 0x86, 0x29, 0xA5, 0x82, 0xA7, 0x68, 0x80, and 0x2B.
a) How many blocks of main memory are there?
b) Assuming a direct mapped cache:
i. Show the format for a main memory address assuming that the system uses direct mapped
cache. Specify field names and sizes.
ii. What does cache look like after the 10 memory accesses have taken place? Draw the cache
and show contents and tags.
iii. What is the hit rate for this cache on the given sequence of memory accesses?
c) Assuming a fully associative cache:
i. Show the format for a main memory address. Specify field names and sizes.
ii. Assuming that all cache blocks are initially empty, blocks are loaded into the first available
empty cache location, and cache uses a first-in, first-out replacement policy, what does cache
look like after the 10 memory accesses have taken place?
iii. What is the hit rate for this cache on the given sequences of memory accesses?
d) Assuming a 2-way set associative cache:
i. Show the format for a main memory address. Specify field names and sizes.
ii. What does cache look like after the 10 memory accesses have taken place?
iii. What is the hit ratio for this cache on the given sequence of memory accesses? iv. If a cache
hit retrieves a value in 5ns, and retrieving a value from main memory requires 25ns, what is
the average effective access time for this cache, assuming that all memory accesses exhibit
the same hit rate as the sequence of 10 given, and assuming that the system uses a
nonoverlapped (sequential) access strategy

A direct mapped cache consists of 8 blocks. Byte-addressable main memory contains 4K blocks of
8 bytes each. Access time for the cache is 22ns, and the time required to fill a cache slot from main
memory is 300ns. (This time allows us to determine that the block is missing and bring it into
cache.) Assume that a request is always started in parallel to both cache and to main memory (so if
it is not found in cache, we do not have to add this cache search time to the memory access). If a
block is missing from cache, the entire block is brought into the cache and the access is restarted.
Initially, the cache is empty.
a) Show the main memory address format that allows us to map addresses from main memory to
cache. Be sure to include the fields as well as their sizes.
b) Compute the hit ratio for a program that loops 4 times from addresses 0x0 to 0x43 in memory.
c) Compute the effective access time for this program

 

Consider a byte-addressable computer with 24-bit addresses, a cache capable of storing a total of
64KB of data, and blocks of 32 bytes. Show the format of a 24-bit memory address for:
a) direct mapped
b) associative
c) 4-way set associative

 

 

 

of main memory (where each word is 32 bits) and a cache of 32 blocks, where each
of 10 given, and assuming that the system uses a nonoverlapped (sequential)
block is four words. Show the main memory address format for this machine. (Hint:
assuming that all memory accesses exhibit the same hit rate as the sequence
i. Show the format for a main memory address. Specify field names and sizes.
ii. What does cache look like after the 10 memory accesses have taken place?
iv. If a cache hit retrieves a value in 5ns, and retrieving a value from main r
iii. What is the hit ratio for this cache on the given sequence of memory accesses?
4K blocks of 8 bytes each. Access time for the cache is 22ns, and the time required to fill
*15. Suppose a byte-addressable computer using 4-way set-associative cache has 216 words
406
Chapter 6 / Memory
d) Assuming a 2-way set-associative cache:
a
a
a
ory requires 25ns, what is the average effective access time for hi nem-
assuming that all memory accesses exhibit the same hit rate as
the
sequence
of 10 given, and assuming that the system uses a nonoverlapped (seanen
access strategy?
13. A direct-mapped cache consists of 8 blocks. Byte-addressable main memory comt.
4K blocks of 8 bytes each. Access time for the cache is 22ns, and the time required te cn
a cache slot from main memory is 300ns. (This time allows us to determine that the blea
is missing and bring it into cache.) Assume that a request is always started in parallel to
both cache and to main memory (so if it is not found in cache, we do not have to add this
cache search time to the memory access). If a block is missing from cache, the entire
block is brought into the cache and the access is restarted. Initially, the cache is empty.
a) Show the main memory address format, which allows us to map addresses from
main memory to cache. Be sure to include the fields as well as their sizes.
b) Compute the hit ratio for a program that loops four times from addresses Ox0 to
Ox43 in memory.
c) Compute the effective access time for this program.
14. Consider a byte-addressable computer with 24-bit addresses, a cache capable of stor-
ing a total of 64KB of data, and blocks of 32 bytes. Show the format of a 24-bit
memory address for:
a) direct mapped
b) associative
c) 4-way set associative
*15. Suppose a byte-addressable computer using 4-way set-associative cache has 2* wo
determining the address format, you must convert everything to bytes.)
16. Assume a direct-mapped cache that holds 4096 bytes, in which each block 1o the table
Assuming that an address is 32 bits and that cache is initially empty, comple any. of
that follows. (You should use hexadecimal numbers for all answers.) Whe in to be
Transcribed Image Text:of main memory (where each word is 32 bits) and a cache of 32 blocks, where each of 10 given, and assuming that the system uses a nonoverlapped (sequential) block is four words. Show the main memory address format for this machine. (Hint: assuming that all memory accesses exhibit the same hit rate as the sequence i. Show the format for a main memory address. Specify field names and sizes. ii. What does cache look like after the 10 memory accesses have taken place? iv. If a cache hit retrieves a value in 5ns, and retrieving a value from main r iii. What is the hit ratio for this cache on the given sequence of memory accesses? 4K blocks of 8 bytes each. Access time for the cache is 22ns, and the time required to fill *15. Suppose a byte-addressable computer using 4-way set-associative cache has 216 words 406 Chapter 6 / Memory d) Assuming a 2-way set-associative cache: a a a ory requires 25ns, what is the average effective access time for hi nem- assuming that all memory accesses exhibit the same hit rate as the sequence of 10 given, and assuming that the system uses a nonoverlapped (seanen access strategy? 13. A direct-mapped cache consists of 8 blocks. Byte-addressable main memory comt. 4K blocks of 8 bytes each. Access time for the cache is 22ns, and the time required te cn a cache slot from main memory is 300ns. (This time allows us to determine that the blea is missing and bring it into cache.) Assume that a request is always started in parallel to both cache and to main memory (so if it is not found in cache, we do not have to add this cache search time to the memory access). If a block is missing from cache, the entire block is brought into the cache and the access is restarted. Initially, the cache is empty. a) Show the main memory address format, which allows us to map addresses from main memory to cache. Be sure to include the fields as well as their sizes. b) Compute the hit ratio for a program that loops four times from addresses Ox0 to Ox43 in memory. c) Compute the effective access time for this program. 14. Consider a byte-addressable computer with 24-bit addresses, a cache capable of stor- ing a total of 64KB of data, and blocks of 32 bytes. Show the format of a 24-bit memory address for: a) direct mapped b) associative c) 4-way set associative *15. Suppose a byte-addressable computer using 4-way set-associative cache has 2* wo determining the address format, you must convert everything to bytes.) 16. Assume a direct-mapped cache that holds 4096 bytes, in which each block 1o the table Assuming that an address is 32 bits and that cache is initially empty, comple any. of that follows. (You should use hexadecimal numbers for all answers.) Whe in to be
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 4 images

Blurred answer
Knowledge Booster
Instruction Format
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
Recommended textbooks for you
Database System Concepts
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)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education