Project(C program)
The main objective of this project is for you to learn about cache memories, their organization, and the impact of their design on program performance measured in terms of the memory subsystem. In this part, you will code a C program (cache.c), behaviorally simulating a single level cache. Your program will model a data cache with the following parameters
• S: the number of sets in the cache
• A: the associativity (or the number of entries in each set).
• B: the block size in bytes
• R: Replacement policy (R = 1 LRU, R=2 FIFO).
• W: Write policy (W = 1)
• -v Verbose
Your program will support the command line switches to create a cache of the specified parameters. For example,
loki> ./cache –S 512 –A 2 –B 32 –R 1 –W 1 -v
should create 8KB 2-way associative cache, with LRU replacement policy and print the cache (because of verbose switch).
Input: The input to your cache is a file containing memory trace of a C executable produced using the valgrind utility. For example, the following command should produce the trace for the program “ls”.
linux> valgrind --log-fd=1 --tool=lackey -v --trace-mem=yes ls -l
The memory trace file output by valgrind has the following format:
I 0400d7d4,8
M 08,4
L 04f6b868,8
S 7ff0005c8,8
…
Each line is of the form:
[space]operation[space]address,size
The operation I: is an instruction load, L: a data load, S: a data store, and M: a data modify (i.e., a data load followed by a data store). There is never a space before an “I” and there is always a space before each “M”, “L”, and “S”. The address field specifies a 64-bit hex memory address and the size field specifies the number of bytes accessed by the operation.
Output: The program should print the cache in whatever format you choose when it is given a command line as described above.
The program should output the number of hits, misses and the number of evictions when it is given a valgrind trace with a –t switch as follows. Below, [login to view URL] is the trace file obtained using valgrind on some executable example.
linux> ./cache -S 16 -A 1 -B 4 –t [login to view URL]
hits:4 misses:5 evictions:3
Hi! I understand that the project is quite tough and $25 is very less for that. I would still be ready to help you out on this if you give me at least time till Sunday. You can check my reviews to know a bit about me and my skill set. Thanks!
$25 USD in 5 Tagen
5,0 (7 Bewertungen)
3,0
3,0
2 freelancers are bidding on average $123 USD for this job
Embedded Developer, 9+ years, Linux Device Driver, Bootloaders, Board Bring-up
Dear Sir/Madam,
I have 9+ years experience in Embedded Development. I have experience in Linux device drivers, UEFI (Bootloader) development and Board Bring-up. I have knowledge of PCI, PCIe, Ethernet, USB, UART, and USB Host Controller (OTG).
I can start ur work immediately.
I have 10 years experience in coding and development.
I'm expert in writing programs in JAVA, .NET, C, C++
I have experience in hadoop,python coding,
PHP
Android
Neo4j
Hbase
Nosql
Nosql
sql
Oracle
Mongodb
Spark
Hive
Pig
I can meet your requirements.
Looking forward..