Creating a simulator that maintains coherent caches

Assignment Help Computer Engineering
Reference no: EM131465242

Project - Cache Coherence

1. Project Description

On the surface cache coherence seems straightforward; all caches simply must see all operations on a piece of data in the same order. Implementation of coherence, however, is not so simple. In this project, you will be creating a simulator that maintains coherent caches for a 4,8, and 16 core CMP. You will be implementing the MSI, MESI, MOSI, MOESI, and MOESIF protocols for a bus-based broadcast system.

2. Simulator Specifications and More Details

The following list details the simulator specifications, and describes your assignment more information can be found by reading the source code:

  • The simulator is capable of simulating a 4, 8, and 16 core CMP system. Each core will consist of a memory trace reader. This trace reader will read in trace files provided to you. The trace reader code will be provided to you.
  • Each core in the CMP has one level of cache. The cache is fully associative, has infinite size, and has a single cycle lookup time. The base cache code is provided for you. You will only need to implement the protocol files needed to process requests at the cache (described later). The CMP has a single memory controller which can access the off chip memory. This memory controller is provided for you and will respond to any query (GETS or GETM) placed on the bus with data after a 100 cycle delay.
  • The bus modeled is an atomic bus. This means that once a query is placed on the bus, the bus will not allow any other requests onto the bus until a DATA response is seen. Caches request the bus using the bus request() function. If the bus is not available, it will place the request on an arbitration queue to be scheduled in the future. This is done on a first come first served basis, with node 0 having the highest priority and node N having the lowest priority.
  • Each processor (trace reader) will have up to one outstanding memory request at a time. The processor will send a request to the cache and will wait until the cache responds with a DATA msg. (This will be done using the send DATA to proc() command)
  • We have provided a full simulator framework in C++. This framework creates the simulator, reads in the traces, creates a basic cache structure, and creates the memory controller. All of this code is in the sim/ directory of the downloadable code. You should not need to change ANY code in the sim/ directory.
  • The protocols/ directory contain files you may need to modify. Most notably, you need to implement the protocol files. When a request comes from a processor to the cache, the cache finds the entry and then calls process cache request()in the protocol. It is in this function that you should look at the cache entry's state and decide what messages (if any) should be sent, and what state the cache should transition to. When a request is snooped on the bus, the cache finds the entry and then calls process snoop request() in the protocol. It is in this function that you should look at the cache entry's state and decided what messages (if any) should be sent, and what state the cache should transition to.
  • To help you in understanding the framework, the MI protocol is already completed and given to you. You MUST fill in the following files: MSI protocolf.h/.cppg, MESI protocolf.h/.cppg, MOSI protocolf.h/.cppg, MOESI protocolf.h/.cppg, MOESIF protocolf.h/.cppg.

NOTE: In order to interface properly with the Simulator, do not change any of the class names or delete any functions. You may however need to add additional functions, states, and/or messages in order to complete the assignment.

Simulator Assumptions -

Important Notes About Simulator Assumptions:

1. All requests that are not DATA (GETS and GETM) always expect to have someone reply with DATA. To ensure this, the memory will always respond 100 cycles after the request with DATA unless another cache places DATA on the bus first.

2. There are cases in the traditional protocol where there were certain messages that did not expect replies (e.g. Bus Upgrade). These types of messages are not supported by the bus and memory, so you cannot use them. Instead you should always send a query that expects a data response (e.g. GETS and GETM). This creates situations where the cache sending the GETS or GETM may be the one that should supply the data. In these cases, the cache should simply send DATA to itself on the bus. Given the difficulties in identifying your own GETS or GETM request, the validations assume that you only reply when you are already responsible for supplying the data.

3. In general, there is more than one way to implement each protocol. For this project, the reference implementations were made with simple logic and emphasizing cache to cache transfers, while running in minimal time. For example, contrary to the MESIF article in Wikipedia, the reference implementation will keep the F state at the same processor and not move it.

3. Framework Details

You should download the file labeled Project3.tar.gz to get the simulator source code. This framework uses C++. We will be compiling and running your submitted code using a recent version of gcc. You are only responsible for filling in the code in the files in the protocols/ directory.

Running the Simulator

From the root directory of the project, run the make command and then use the following command to run a trace:

./sim trace -t trace directory -p protocol

As an example, you can run:

./sim trace -t traces/4proc validation -p MI

Trace directory is the directory with the trace you want to run. A trace directory consists of a trace for each core in the machine and a con?g ?le that contains the number of cores for this trace. Each line in the trace directory denotes one memory access and includes the action (read or write) and the address.protocol is the protocol you want to run. The options are: MI, MSI, MESI, MOSI, MOESI, and MOESIF.

Validation: Inside of each trace directory you will find multiple text files for the validation runs of each protocol. You should perform experiments on all of the provided experiment traces.

Statistics -

We are concerned about the following statistics:

  • Final cache coherence state (Already output by framework)
  • Number of cycles to complete execution (Already output by framework)
  • Number of cache misses (This can be due to a cold miss or coherence)
  • Number of cache accesses (Already output by framework)
  • Number of silent upgrades for the MESI protocol
  • Number of Cache-to-cache transfers (This refers to the number of times data is not supplied by Memory)

4. Validation and Experiments

You must run your simulator and debug it until it completely matches all the statistics in the validation outputs posted on t-square. You will not get credit for your experiments until you do this.

Experiments

Compare each of the provided programs (experiment1, ... experiment8) using the various protocols you implemented (MI, MSI, MESI, MOSI, MOESI, MOESIF). Plot the execution time and using the statistics above (and any other information you deem necessary) explain why certain protocols perform better for certain traces.

5. What to Hand In

You must make a single tar.gz file names (your gt account login.tar.gz) (eg. gburdell3.tar.gz) that contains the following:

1. The design results of the experiments for each trace file, with a persuasive argument of the choices that were made in PDF format

2. The commented source code for the protocols added to the simulator program.

Assignment Files -

https://www.dropbox.com/s/szbkh90yj0f8kk6/Assignment%20Files.zip?dl=0

Reference no: EM131465242

Questions Cloud

Example of an unintended consequence of big data analytics : List one example of an unintended consequence of Big Data analytics.
Describe a typical communications review : Describe a typical communications review and approval process-Outline the communication activities carried out in the Initiation phase of the project life cycle.
Absenteeism turnover and job satisfaction are reactions : "Absenteeism, turnover and job satisfaction are reactions to an individual's perception Dissatisfaction with working conditions
Sort more efficient than each other : In Java, in what circumstances are selection, selection, or merge sort more efficient than each other?
Creating a simulator that maintains coherent caches : CS 4290/6290, ECE 4100/6100 - Spring 2017 Project - Cache Coherence. In this project, you will be creating a simulator that maintains coherent caches
Machines work non-stop and are never starved of parts : Assuming the machines work non-stop and are never starved of parts, what is the average number of minutes between part completions for the station as a whole?
Purpose of the stakeholder engagement cycle : Identify and briefly describe the five commonly traded organisational currencies - Outline the stages and describe the purpose of the stakeholder engagement cycle.
Digital library-digital documents archive : Discuss and Describe at least 15 literature resources relating to the "Digital Library's and/or Digital Documents Archive" project being carried out.
Determine the natural frequencies : In Figure, the shaft ends that support gears 1 and 2 are rigidly attached to ground. The gears are rigidly engaged. The shaft for gear 1 has a 20 cm length.

Reviews

len1465242

4/17/2017 5:54:04 AM

Topic: Cache Coherence – Computer Architecture. Detailed Question: Computer Architecture, Cache Coherence. C++. OSX. Please read it carefully and I want to get the solution asap. NOTE: In order to interface properly with the Simulator, do not change any of the class names or delete any functions. You may however need to add additional functions, states, and/or messages in order to complete the assignment.

Write a Review

Computer Engineering Questions & Answers

  Program to find smaller between num1 and num2 to output

Program to find smaller between num1 and num2 to output

  What is the cookie

What is a cookie? What are advantages and disadvantages of using cookies in a web application.

  Find out if the graph is connected

show both graphs, then I need to display which portions of the 2 graphs are "connected" or the same. The areas that are the same need to be put into a minimal spanning tree.

  What aim does a firewall play in an organization

How varios two routers be used to provide separation of a LAN from the outside world? Provide references.

  How to compare and contrast monitoring of patient vital sign

the Mobile computing has dramatically changed how information is accessed and shared. Wireless networking has been an enabler of mobile computing.

  64-bit architecture

How would you design software to do this (Use a maximum of one to two paragraphs of 5-7 sentences each)?

  Explain how the two types of assets are valued

explain how the two types of assets are valued for balance sheet purposes, using the following assets owned by a company that writes and sells software packages.

  How many address lines are needed to access memory

How many address lines are needed to access memory.

  Paste image of linear programming results window

A linear programming problem cost minimization problem has objective function: Minimize X +Y. Use QM for Windows to plot the feasible region. Paste image of Linear Programming Results window and Solution List window here

  Research and write a short description of internet

research and write a short description of internet technologies 3-4 pages not including cover page or reference list

  Cryptography in embedded systems

The purpose of this activity is to provide students with an opportunity to practice critiquing scholarly articles, which is a vital research skill.

  Write down the syntax for a 2d array

Write the syntax for a 2D array which has four rows. The first row would have 10 elements and the second row will have 5 elements. The third row will have 8 elements and the fourth row will have 12 elements.

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