What is the importance of cache memory on phones and computers, and how does it work?

558 views

What is the importance of cache memory on phones and computers, and how does it work?

In: Technology

6 Answers

Anonymous 0 Comments

Cache is a small bit of exceptionally fast storage, the processor can pull stuff from it in under a nanosecond which lets it keep moving quickly

If something isn’t in cache it has to go to RAM which takes around 10 nanoseconds to get anything from, and even getting stuff from the Flash/SSD is 100,000 ns which wastes a lot of time. HDDs are 7,000,000 ns which is absymal.

The cache is there so the processor can have what it needs to keep busy and keep the task moving along, if it has to keep waiting for stuff from RAM or the SSD it spends a lot of time sitting there doing nothing. There’s a lot of work that goes into ensuring the right stuff is in cache for each workload because having to go to the RAM 10% of the time is a pretty big hit on performance.

For scale here, if you’re doing math homework the cache holds the paper next to you (<1 second access time), the RAM is the notebook in your backpack (10 seconds to get), the SSD is your locker at school which is closed for rest of the weekend (27 **hours** away) and anything on the hard drive may as well not exist because its on a small island in the pacific that is only accessible by small sailboat during certain seasons (81 **days** away). If every math problem required pulling out your notebook it’d slow you way down so you’d probably just keep it next to you to save time(caching it), but if every problem required getting a different book from your locker you’d never finish anything in the expected time

You are viewing 1 out of 6 answers, click here to view all answers.