Go4Expert

Go4Expert (http://www.go4expert.com/)
-   Java (http://www.go4expert.com/forums/java/)
-   -   Cache Simulator (http://www.go4expert.com/forums/cache-simulator-t17952/)

brucey 12Jun2009 07:03

Cache Simulator
 
Hello all,

I am just getting into Java and have been given a test from my fellow colleagues.

They have asked me:

"Given test data in a sequence of random numbers in the range 00000 - 99999.

Each of these numbers is an address reference. So, every A is a p-digit number, p = 5.

Cache Size = 100 Bytes (N = 2)
Block Size = 10 Bytes (M = 1)

Build a Java program for a Direct Mapped and Fully Associative Cache.

Show the contents of the Cache after all the given references have been made (in both cases) in the order they were supplied.

Calculate hit and miss rates (in both cases).

For displaying the cache contents, represent the memory content at address A simply as M(A).

Where necessary, you should employ the Least Recently Used scheme for block replacement."

(Test data is 119 random numbers all of 5 digits).

brucey 12Jun2009 07:08

Re: Cache Simulator
 
Woops...forgot to ask...someone please help!! :)

brucey 19Jun2009 00:44

Re: Cache Simulator
 
Can anybody help? I will be grateful!


All times are GMT +5.5. The time now is 05:55.