Cache memory

Forum Storage : General Storage - Cache memory

Tom's Hardware: Over 1.4 million members in 6 different countries available to answer all your high-tech questions. Sign up now! Its free!
Word :    Username :           
 

why cache memory is invisible to the OS

Sponsored Links
Register or log in to remove.

What cache memory? You talking about HDD cache, controller cache, FIFO caches, RAM cache, CPU cache or .. ?

Cache memory is used to speedup access; data accessed frequently can be 'cached' so it reads faster. Typically caches are read-only; when performing writing this is often a buffer as the intent has changed.

------------------------------ ...man will occasionally stumble over the truth, but usually manages to pick himself up, walk over or around it, and carry on.
Reply to sub mesa

I'm going to assume here that you're talking about CPU cache for data in RAM.

Strictly speaking, it ISN'T invisible to the OS - the OS actually has to do some work to make sure the cache works correctly. For example, if the OS commands a DMA device (such as a hard drive) to transfer data to RAM, it needs to mark the corresponding lines in cache memory as "invalid" so that programs which use the data don't get a stale copy from the cache.

But for normal instructions, it's the job of the hardware to automatically fetch data from the cache if it's available. It would defeat the purpose of cache (to increase performance) if it required extra instructions to be executed to figure out where the data is.

Reply to sminlal
Tom's Hardware > Forum > Storage > General Storage > Cache memory
Go to:

There are 1286 identified and unidentified users. To see the list of identified users, Click here.

Sponsored links
  • Ask the community now
  • Publish
Ad
They won a badge
Join us in greeting them