Find Jobs
Hire Freelancers

C program (cache.c)

$10-30 USD

Completed
Posted almost 8 years ago

$10-30 USD

Paid on delivery
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
Project ID: 10595487

About the project

2 proposals
Remote project
Active 8 yrs ago

Looking to make some money?

Benefits of bidding on Freelancer

Set your budget and timeframe
Get paid for your work
Outline your proposal
It's free to sign up and bid on jobs
Awarded to:
User Avatar
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 days
5.0 (7 reviews)
3.0
3.0
2 freelancers are bidding on average $123 USD for this job
User Avatar
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).
$222 USD in 2 days
5.0 (1 review)
0.6
0.6
User Avatar
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..
$111 USD in 2 days
0.0 (0 reviews)
0.0
0.0

About the client

Flag of UNITED STATES
omaha, United States
5.0
4
Payment method verified
Member since Apr 15, 2016

Client Verification

Thanks! We’ve emailed you a link to claim your free credit.
Something went wrong while sending your email. Please try again.
Registered Users Total Jobs Posted
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Loading preview
Permission granted for Geolocation.
Your login session has expired and you have been logged out. Please log in again.