Q:

Why are the test values the same for FIFO and LRU?

I had a computer science assignment where we compared FIFO, LRU and random policy for a cache memory. FIFO and LRU were equally good as improvements to a random policy. Why? Is it just a coincidence? We use a MIPS emulator software to do the assignment. 

A:

It is not exactly a coincidence, it is a failure of your testing methodology to use the cache in such a way that would make the superiority of LRU over FIFO evident.
The superiority of LRU is evident if your memory accesses consist partly of random accesses, resulting mostly in cache misses, and partly of accesses from a small locality which is smaller than your cache.  These localized accesses will mostly result in cache hits for LRU, but will often result in misses with FIFO, because FIFO will offload them just because they were loaded a long time ago, regardless of the fact that they were used very recently.
If you post your methodology we might be able to tell precisely what's wrong with it.

