Question: write makefile and the code in c Assignment Details Your server must implement the functionality explained below subject to the limitations below. Functionality Your new

write makefile and the code in c
Assignment Details
Your server must implement the functionality explained below subject to the limitations below.
Functionality
Your new cacher should take two command line arguments, sizethe size of your cachepolicythe
policy your cache will follow. The policy flag will be present and will be exactly -F (First-In First-Out),
-L (Least Recently Used), or -C (Clock). Your cacher should use First-In First-Out if no policy is given.
./cacher [-N size]
Once initialized, cacher must continuously take newline separated items from stdin until stdin is closed.
For each item received, cacher should access the cache to determine if the item exists. Depending on if the
access resulted in a HIT or MISS , cacher should update the cache accordingly. Namely, on a MISS , the cache
should print out HIT
. On a MISS , the cache should print out MISS
, add the item to the cache,
and, if the cache is full, evict an item from the cache following the caching policy. When stdin is closed, a
summary line should be printed which specifies the number of misses that were compulsory misses and the
number that were capacity misses. Note there are no conflict misses since we have a fully associative cache.
The following is a table for formatting the required outputs.
1
stdout
Cache Hit HIT
Cache Miss MISS
Summary Line
Additional Functionality
In addition to supporting the methods listed above, cacher should not have any memory leaks.
Limitations
You must write cacher using the C programming language. It program cannot use functions, like system
or execve, that allow you to execute external programs. If your submission does not meet these
minimum requirements, then the maximum score that you can get is 5%.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!