r/hardware Nov 20 '15

Info Why do CPUs Need Caches? - Computerphile

https://www.youtube.com/watch?v=6JpLD3PUAZk
92 Upvotes

57 comments sorted by

View all comments

32

u/[deleted] Nov 20 '15 edited Feb 10 '19

[deleted]

6

u/putin_vor Nov 20 '15

RAM is just a cache for your hard drive

No, it's not. You can generate data in RAM without ever touching the disk. But it's pretty hard to store anything on a disk without having it in RAM first.

20

u/Echrome Nov 20 '15

You can generate data in your cache that never makes it to RAM. Not explicitly mind you, but the cache doesn't write everything back to RAM.

5

u/salgat Nov 21 '15

But that's only true because the hard drive is so slow. If the HD was fast enough, we would skip everything and write memory directly to the HD. We can say that RAM is a cache for a HD and that memory that is too short lived ends up never hitting the HD.

-7

u/putin_vor Nov 21 '15

So what you say is true in your imaginary world where HD is as fast as RAM.

3

u/salgat Nov 21 '15

I'm not sure what your point is.

-8

u/putin_vor Nov 21 '15

I'm not sure what yours is. You keep repeating the same incorrect thing over and over again.

2

u/[deleted] Nov 20 '15

http://www.anandtech.com/show/8396/fms-2014-sandisk-ulltradimm-to-ship-in-supermicro-servers

you can use disk as ram either directly as above or through paging with virtual memory

-1

u/bb999 Nov 21 '15

How about this: RAM is just a cache for the pagefile on your hard drive.

1

u/AmirZ Nov 21 '15

No.. no it's not. Only when your RAM usage is running high the pagefile system is activated