The world’s Largest Sharp Brain Virtual Experts Marketplace Just a click Away
Levels Tought:
Elementary,Middle School,High School,College,University,PHD
| Teaching Since: | Jul 2017 |
| Last Sign in: | 304 Weeks Ago, 2 Days Ago |
| Questions Answered: | 15833 |
| Tutorials Posted: | 15827 |
MBA,PHD, Juris Doctor
Strayer,Devery,Harvard University
Mar-1995 - Mar-2002
Manager Planning
WalMart
Mar-2001 - Feb-2009
need assistance with the assignment. please provide answers in the same word document.
Â
CMIS 310
HOMEWORK #5 – Week #5
Â
This homework is worth 10% of your course grade.
Â
Read each problem carefully. Failure to follow the instructions for a problem will result in a zero score for that problem.
Â
Submit the completed Homework via Assignment in LEO.
Â
Â
1.     Do Exercise 2 in Chapter 6 (Memory) of Null and Lobur
Suppose a computer using direct mapped cache has 232Â words of main memory and a cache of 1024 blocks, where each cache block contains 32 words.
a.   How many blocks of main memory are there?
b.   What is the format of a memory address as seen by the cache, that is, what are the sizes of the tag, block, and word fields?
c.   To which cache block will the memory reference 000063FA16 map?
Â
Solutions:
Â
a: Â 2^32=4GB words
Â
b: 2^32/(1024*32)=2^32/2^15=2^17 blocks in the main memory
. 32-15=17 bit for Tag. Offset is 5 bits for offset
c. 0000 0000 0000 0000 0110 0011 1111 1010 0001 0110
Take least significant bits 111 1010 0001 0110
Â
2.     Do Exercise 4 in Chapter 6 (Memory) of Null and Lobur
Suppose a computer using fully associative cache has 224Â words of main memory and a cache of 128 blocks, where each cache block contains 64 words.
a.   How many blocks of main memory are there?
b.   What is the format of a memory address as seen by the cache, that is, what are the sizes of the tag and word fields?
c.   To which cache block will the memory reference 01D87216 map?
Â
Solutions:
Â
a.
Â
b.Â
Â
c. Since it is associative cache, this can map anywhere
Â
3.     Do Exercise 6 in Chapter 6 (Memory) of Null and Lobur
A 2-way set associative cache consists of four sets. Main memory contains 2K blocks of eight words each.
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 3 times from locations 8 to 51 in main memory. You may leave the hit ratio in terms of a fraction.
Â
Â
4.     Do Exercise 8 in Chapter 6 (Memory) of Null and Lobur
Suppose a computer using set associative cache has 221Â words of main memory and a cache of 64 blocks, where each cache block contains 4 words.
a.   If this cache is 2-way set associative, what is the format of a memory address as seen by the cache, that is, what are the sizes of the tag, set, and word fields?
b.   If this cache is 4-way set associative, what is the format of a memory address as seen by the cache?
Â
Â
5.     Do Exercise 12 in Chapter 6 (Memory) of Null and Lobur
Suppose a process page table contains the entries shown below. Using the format shown in Figure 6.15a, indicate where the process pages are located in memory.

Â
|
Frame |
Valid bit |
|
1 |
1 |
|
- |
0 |
|
0 |
1 |
|
3 |
1 |
|
- |
0 |
|
- |
0 |
|
2 |
1 |
|
- |
0 |
Â
Â
Â
Â
Â
----------- Â ----------- H-----------ell-----------o S-----------ir/-----------Mad-----------am ----------- Th-----------ank----------- yo-----------u f-----------or -----------you-----------r i-----------nte-----------res-----------t a-----------nd -----------buy-----------ing----------- my----------- po-----------ste-----------d s-----------olu-----------tio-----------n. -----------Ple-----------ase----------- pi-----------ng -----------me -----------on -----------cha-----------t I----------- am----------- on-----------lin-----------e o-----------r i-----------nbo-----------x m-----------e a----------- me-----------ssa-----------ge -----------I w-----------ill----------- be----------- qu-----------ick-----------ly