Who is online?
In total there are 5 users online :: 0 Registered, 0 Hidden and 5 Guests None
Most users ever online was 35 on Sat Sep 23, 2023 10:39 am
Log in
Cache
4 posters
Page 1 of 1
Cache
wat is it... srsly...
yeah yeah yeah wikipedia bullcrap, but could someone explain to me the different types of cache, how they differ, how it works, why it's used... basically everything about it. I already have a general idea, but some of the stuff like:
and how these two:
http://en.wikipedia.org/wiki/File:Write_through_with_no-write_allocation.png
http://en.wikipedia.org/wiki/File:Write_back_with_write_allocation.png
dont mean much to me. how are the two above different... what's that no write/write allocation...
etc..
thanks in advance.
yeah yeah yeah wikipedia bullcrap, but could someone explain to me the different types of cache, how they differ, how it works, why it's used... basically everything about it. I already have a general idea, but some of the stuff like:
and how these two:
http://en.wikipedia.org/wiki/File:Write_through_with_no-write_allocation.png
http://en.wikipedia.org/wiki/File:Write_back_with_write_allocation.png
dont mean much to me. how are the two above different... what's that no write/write allocation...
etc..
thanks in advance.
gilgamesh993- Elite Poster
- Posts : 2808
Join date : 2010-03-13
Age : 29
Location : Mars
Re: Cache
lol holy shit dude. ive got no idea on how they work..all i know is, is that cache is super fast ram built into your cpu or hdd or whatever. i dont want to know all the technical stuffs about it lol..hurts my brain
Re: Cache
Cache is the magical powder that falls from the part of the memory "That's magically delicious!!"
Re: Cache
WELL NAO. if you peeps don't know...
gilgamesh993- Elite Poster
- Posts : 2808
Join date : 2010-03-13
Age : 29
Location : Mars
Re: Cache
Alrighty, cache,
Different types of cache, you know there is the L1/2/3 cache's, but if we were to be picky, the HDD/SSD, and the RAM are also caches. Going along with the standard definition, a cache stores stuff. The different classifications and names are solely to indicate how far away that cache is from the processor, as that has a direct correlation with the time it takes to access data.
L1>L2>L3>RAM>HDD in terms of speed.
How they differ. Alright, L1 cache is used at the same speed as the processor. So a 2.4 ghz processor will have a L1 cache with a speed of 2.4 ghz. Now from this point, values can become arbitrary. L2 cache is not as close to the processor as L1, and therefore is slower. While the L1 cache may have a speed of 2.4 ghz, L2 cache may have the speed three or four times slower than that. Therefore, L3 cache, which is even further away from the processor, on the motherboard I think, has a speed several times slower than the L2 cache. Same for RAM and HDD even though they aren't called cache.
How it works. Okedokey, analogy time. Take a library with just one librarian. Assume you don't know how to find a book, or just can't find it. You ask the librarian. The librarian then looks in the storage room for the book, and brings it out for you. You take it, then return it later. The librarian now has to return the book to the storage; a full cycle. Then say another person goes looking for the same book, the librarian has to go through the cycle again. This is very slow, sluggish, and inefficient.
Now introduce a librarian's version of cache. A cart holding books. Now, when a person first asks for a book, the librarian goes to the storage room and finds the book, but when the book is returned, it goes to the cart. Then, once the second person asks for the book, the librarian first looks at the cart and if the book is there, time is saved from having to go to the storage room and back.
All of this, in a computer, is controlled by the processor. The processor is the librarian, and stores the most used or the recently used data in the cache and RAM for quicker access to the data. The processor uses algorithms and shit to figure out what to store and uses complexer algorithms to figure out what might be needed to store.
Different types of cache, you know there is the L1/2/3 cache's, but if we were to be picky, the HDD/SSD, and the RAM are also caches. Going along with the standard definition, a cache stores stuff. The different classifications and names are solely to indicate how far away that cache is from the processor, as that has a direct correlation with the time it takes to access data.
L1>L2>L3>RAM>HDD in terms of speed.
How they differ. Alright, L1 cache is used at the same speed as the processor. So a 2.4 ghz processor will have a L1 cache with a speed of 2.4 ghz. Now from this point, values can become arbitrary. L2 cache is not as close to the processor as L1, and therefore is slower. While the L1 cache may have a speed of 2.4 ghz, L2 cache may have the speed three or four times slower than that. Therefore, L3 cache, which is even further away from the processor, on the motherboard I think, has a speed several times slower than the L2 cache. Same for RAM and HDD even though they aren't called cache.
How it works. Okedokey, analogy time. Take a library with just one librarian. Assume you don't know how to find a book, or just can't find it. You ask the librarian. The librarian then looks in the storage room for the book, and brings it out for you. You take it, then return it later. The librarian now has to return the book to the storage; a full cycle. Then say another person goes looking for the same book, the librarian has to go through the cycle again. This is very slow, sluggish, and inefficient.
Now introduce a librarian's version of cache. A cart holding books. Now, when a person first asks for a book, the librarian goes to the storage room and finds the book, but when the book is returned, it goes to the cart. Then, once the second person asks for the book, the librarian first looks at the cart and if the book is there, time is saved from having to go to the storage room and back.
All of this, in a computer, is controlled by the processor. The processor is the librarian, and stores the most used or the recently used data in the cache and RAM for quicker access to the data. The processor uses algorithms and shit to figure out what to store and uses complexer algorithms to figure out what might be needed to store.
VenArch- Admin
- Posts : 1135
Join date : 2010-12-21
Age : 28
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum