What is the average memory access time

Assignment Help Computer Engineering
Reference no: EM131006216

Question 1. Cache Mapping and Access

Consider a 1 MB cache with 16-word cachelines. Each word is 4-Bytes. This cache uses write-back scheme, and the address is 32 bits wide.

A. Direct-Mapped Cache Fields

Assume the cache is direct-mapped. Fill in the table below to specify the size of each address field of the cache.

Field                      Size (bits)

Cacheline             Offset

Cacheline             Index

Tag

B. Fully-Associative Cache Fields

Assume the cache is fully-associative. Fill in the table below to specify the size of each address field of the cache.

Field                      Size (bits)

Cacheline             Offset

Cacheline             Index

Tag

C. 16-Way Set-Associative Cache Fields

Assume the cache is 16-way set-associative. Fill in the table below to specify the size of each address field.

Field                      Size (bits)

Cacheline             Offset

Cacheline             Index

Tag

Question 2. Average Memory Access Time

Assume the following processor configuration: a dedicated L1 cache for instructions (IL1) and a L1 cache for data (DL1), a shared L2 cache that serves as an intermediate level between each of the L1 caches and the main memory. The figure below shows the hierarchy:

396_memory.jpg

Figure 1: Cache Hierarchy

Processor Spec Computer A
Cycle Time 1ns
Hit Time to L1(I-L1 or D-L1) and return the data to the processor 1 cycle
1L1 miss rate 8%
DL1 miss rate 15%
Hit Time to L2 and return the data to the L1(I-L1  or D-L1) 6 cycles
L2 miss rate 30%
Main Memory Access Time from L2 50 cycles

Figure 2: Table containing the processor cache Specifications

Out of the total instructions executed in this processor, assume load/store instructions comprise of 25% of the total instructions. Answer the following questions.

A. Calculate AMAT

What is the average memory access time?

B. Processor with no caches

Assume CPI = 1 if the processor has no memory stalls. Without the caches, each memory access would take 52 cycles. What is the CPI of the processor without any caches?

C. Processor with two levels of caches (as in Figure 1)

Assume CPI = 1 if the processor has no memory stalls. What is the CPI of processor with the all the caches? Remember that it takes 50 cycles to access memory from L2.

Question 3. Two-Cycle Instruction Cache

In this problem, we will be examining the performance of the instruction cache on the MIPS assembly program shown on the next page. The first column shows the instruction address for each instruction. Note that these addresses are byte addresses. The value of r1 is initially 64, meaning that there are 64 iterations in the loop. In this problem, we will be considering the execution of this loop with a direct-mapped instruction cache microarchitecture with eight cache lines, and each cacheline is 16B. This means each cache line can hold four instructions and the bottom four bits of an instruction address are the block offset. Hint: The first instruction in the code segment (i.e., addiu r1, r1, -1), is in the middle of a cache line with starting address 0x100.

For this problem, the instruction cache hit time is two cycles, but it is fully pipelined. Tag check occurs in the first cycle, and if it is a hit, the instruction is read in the second cycle. Essentially, this creates a six-stage pipelined processor with the following stages: instruction cache tag check (F0), instruction cache data access (F1), decode (D), execute (X), memory (M), and write-back (W). This also implies the data cache hit time is one cycle.

Assume that jumps are resolved in the decode stage and that branches are re- solved in the execute stage. Assume the miss penalty is three cycles so on a cache miss the pipeline will stay in F0 for a total of three cycles, go into F1 for one cycle, and then continue as normal. You should assume that in every other way, the processor pipeline follows the classic fully-bypassed five-stage pipeline. Assume that the processor does not include a branch delay slot. Assume the processor speculatively predicts all jumps and branches are not taken.

A. Control Hazards

Draw a pipeline diagram illustrating the first iteration of the loop assuming there are no instruction cache misses. Remember that there are two fetch stages (F0 and F1). Show stalls by simply repeating the pipeline stage character (e.g., D) for multiple consecutive cycles.

Use a dash (-) to indicate pipeline bubbles caused by killing instructions (pipeline flushes). You should show all instructions in the first iteration of the loop and the first instruction of the second iteration that you can properly draw the control dependency for the backwards branch.

 

Address

 

Instruction

Q3.B Iteration 1

ICache Miss Type

Q3.C Iteration 2

ICache Miss Type

 

loop:

 

 

0x108

addiu r1, r1,  -1

 

 

0x10c

j foo

 

 

0x110

addiu r2, r2,  1

 

 

0x114

addiu r3, r3,  1

 

 

0x118

addiu r4, r4,  1

 

 

0x11c

addiu r5, r5,  1

 

 

 

...

 

 

 

foo:

 

 

0x218

bgtz r1, loop

 

 

0x21c

addiu r6, r6,  1

 

 

0x220

addiu r7, r7,  1

 

 

0x224

addiu r8, r8,  1

 

 

0x228

addiu r9, r9,  1

 

 

B. First Iteration of the Loop

Fill in the table above. In the appropriate column, write compulsory, conflict, or capacity next to each instruction which misses in the instruction cache to indicate the type of instruction cache misses that occur in the first iteration of the loop. Assume that the instruction cache is initially completely empty. Now draw a pipeline diagram illustrating the first iteration of the loop including instruction cache misses. Clearly indicate the number of cycles it takes to execute the first iteration.

C. Second Iteration of the Loop and overall CPI

Continue to fill in the table above. Write compulsory, conflict, or capacity next to each instruction which misses in the instruction cache to indicate the type of instruction caches misses that occur in the second iteration of the loop. Now draw a pipeline diagram illustrating the second iteration of the loop. Clearly indicate the number of cycles it takes to execute the second iteration. Calculate the CPI for this processor executing all 64 iteration of the loop (Note: The CPI calculation should not include instructions that are fetched but then later squashed).

Reference no: EM131006216

Questions Cloud

Cordova tools has bonds outstanding during a year : Cordova Tools has bonds outstanding during a year in which the market rate of interest has risen. If Cordova has elected the fair value option for the bonds, will it report a gain or a loss on the bonds for the year? Explain.
Won the state lottery : You have won the state lottery. There are many ways in which you can receive your prize. You can either have $1 million in cash now or you can have $1.2 million that is paid out as follows: $300,000 now, $300,000 in one year's time, $300,000 in 2 yea..
About the trade : The country of Hykania does not trade with any other country. Its GDP is $20 billion. Its government purchases $3 billion worth of goods and services each year, collects $3 billion in taxes, and provides $2 billion in transfer payments to households...
Respective estimated results in terms of budget surpluses : You have two sets of estimates of national account numbers for a closed economy for next year. In the first set, government expenditures will be $30 billion, transfer payments will be $10 billion, and taxes will be $45 billion. Based on these numbers..
What is the average memory access time : What is the average memory access time - Draw a pipeline diagram illustrating the first iteration of the loop assuming there are no instruction cache misses. Remember that there are two fetch stages
Explain ethical considerations in terms of informed consent : Choose a health care case study on ethical practices form your work environment or from a library article. Explain the basic ethical considerations in terms of informed consent, beneficence, truth telling, and deception.
Context data-flow diagram : a. Construct a context data-flow diagram, illustrating Evergreen Nurseries's whole- sale system. b. Construct a level-0 diagram for Evergreen Nurseries's wholesale system.
List the contents of the current directory : For each directory and file, test to see if the file or directory already exists; if it does exist, do not recreate; if it is missing, create it.
Explain the demographic and psychographic segments : Identify 4-5 consumer behavior concepts that you have learned in the course that are used in the advertisements. Identify and explain the demographic and psychographic segments to which the ad was designed to appeal

Reviews

Write a Review

Computer Engineering Questions & Answers

  Produce a book class that stores book information

Produce a Book class that stores book information

  Write down a 200- to 300-word response recognizing how the

write a 200- to 300-word response identifying how the tasks of an internal and frontline computer support technician

  Show that the order in which catch clauses

Write a program that can be used to show that the order in which catch clauses are listed is important

  What are the characteristics of application

offer examples of business applications that exhibit these characteristics. You can provide examples of applications from any client/server development environment. The two main platforms are Microsoft .NET and Sun JAVA J2EE.

  Compare and contrast monitoring of patient vital signs

mobile computing has dramatically changed how information is accessed and shared. wireless networking has been an

  Write a prolog predicate print state

Write a Prolog predicate print state(X) which will print a state X to the terminal using an asterisk to represent a markable cell and a space to represent a gap between runs of markable cells.

  Describe the difference between tightly coupled and loosely

Describe the difference between tightly coupled and loosely coupled systems and give an example of the types of applications that can be run on each of the systems.

  Application and technology architectures

Generate an application architecture plan for the RPS to follow for the next five (5) years. Build a technology architecture plan and graphic rendering for RPS in order to follow for the next five (5) years.

  Geographic information system for storing point data

For this project you will build a simple Geographic Information System for storing point data. The focus is organizing city records into a database for fast search. For each city you will store the name and its location (X and Y coordinates). Sear..

  Question 1let a be a 4x4 matrix composed of all 0slet b be

question 1let a be a 4x4 matrix composed of all 0s.let b be a 4x4 matrix composed of all 1s. 1. a nand b all

  Implementing program average.java

Write down the program Average.java which just prints the strings that it is provided at the command line, one per line. If nothing is given at the command line, print “No arguments”.

  Description of the purpose of each layer in brief

description of the purpose of each layer in brief. A report to describe the different layers of SOA and the need for each layer. Examples of three Web services. An annotated diagram showing the layers.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd