himanshukj17122000 / Cache_C

Cache Programming in C

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

{\rtf1\ansi\ansicpg1252\cocoartf1671\cocoasubrtf500
{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
{\colortbl;\red255\green255\blue255;}
{\*\expandedcolortbl;;}
\paperw11900\paperh16840\margl1440\margr1440\vieww10800\viewh8400\viewkind0
\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural\partightenfactor0

\f0\fs24 \cf0 1) We run the program cachesim.c on the linux terminal of Duke University. The program has been showing some errors like 3 of the text files are not working. \
\
2) These include random1.txt, random2.txt and border2.txt\
\
3) I believe that the bugs in the border2.txt are because of the fact that there are continuous multiple store instructions in the file in the starting. All these store instructions are missed (which is right) so we have to check for space in the cache and then make space in it if there is no space available. We evict the last column in the cache but before that, we check if the dirty bit for that block is 1 or not. If it is 1, we transfer data from the cache to the memory we have. We then write the data from the store instruction in the first column as according to our technique, the first column is the most recently used block. \
\
4) I believe that there is a problem with the store miss function that I have made as the data is not being written in the cache. It\'92s not properly storing the data as when I printed the data stored in the blocks, it gives me the same value. I also believe that there might be a problem with the load miss function that I have created as the data might be being loaded from the wrong memory address. It is returning 00 for all the load instructions in the end of the file. I have also created a different code for the caches with associativity=1 using the if condition. I believe that the Test 7 might not be working because of the reason that its associativity=1 and I might have a bug there. I strongly believe that there is a problem with data parsing in my code while storing during a store miss. \
\
5) I believe that there is a problem in the load miss function of my code as it might be loading from the wrong address as I can see in the output file of random1.txt (test 49). This might again be a problem with data parsing. I also have problems in loading the correct data from a given address. This can again be attributed to the fact that there are bugs in my store miss function. I tried debugging the code using different methods. \
\
6) I also believe that the random.txt files won\'92t be working because of the size of the data we are working with. The data is not being parsed the right way so there is a problem in storing and loading the data from the cache and even from the main memory. }

About

Cache Programming in C


Languages

Language:C 100.0%