Preview

Feasibilty study

Satisfactory Essays
Open Document
Open Document
263 Words
Grammar
Grammar
Plagiarism
Plagiarism
Writing
Writing
Score
Score
Feasibilty study
Lecturer: Dr. Ayman Adel
Teaching Assistant: Eng. Shereen Oraby
Assignment Date: Week 2
Due Date: Week 3

CC418 - Operating Systems
Sheet #1: Memory Hierarchy

The following problems are taken from Chapter 1 of Operating
Systems: Internals and Design Principles by William Stallings.
1.10
Consider the following code segment: for (i = 0; i < 20; i++) for (j = 0; j < 10; j++) a[i] = a[i] * j i Give one example of spatial locality in the code. ii Give one example of temporal locality in the code.
1.12
Consider a memory system with the following parameters:
Tc
Cc
Tm
Cm

=
=
=
=

100ns
0.01 cents/bit
1,200 ns
0.001 cents/bit

i What is the cost of 1 MByte of main memory? ii What is the cost of 1 MByte of main memory using cache memory technology? iii If the effective access time is 10% greater than the cache access time, what is the hit ratio H ?
1

1.13
A computer has a cache, main memory, and a disk used for virtual memory. If a referenced word is in the cache, 20 ns are required to access it. If it is in main memory but not in the cache, 60 ns are needed to load it into the cache (this includes the time to originally check the cache), and then the reference is started again. If the word is not in main memory, 12 ms are required to fetch the word from disk, followed by 60 ns to copy it to the cache, and then the reference is started again. The cache hit ratio is 0.9 and the main-memory hit ratio is
0.6. What is the average time in ns required to access a referenced word on this system?

2

You May Also Find These Documents Helpful

Related Topics