35 Comments
- Culero, on 11/17/2008, -1/+30what the hell is this crap doing on digg? more pictures of goats!
- netgeek06, on 11/17/2008, -0/+16Miss Rate = 1 – Hit Rate formulas
- Trax91, on 11/18/2008, -0/+15If this is for dummies then I want the full blown retarded one.
- nomadspartan, on 11/17/2008, -0/+9Excellent read.
- lovemorgul, on 11/17/2008, -0/+8everyone talks about USB 3.0 but USB needs memory cache - dugg
- ironiridis, on 11/18/2008, -0/+7And the read time was extremely fast.
- caracter2, on 11/18/2008, -0/+6Awful writing.
- caracter2, on 11/18/2008, -1/+6So many grammatical mistakes...
"this type of misses will no more occur."
"the cache is full and need to make room for current data"
"only to a unique cache block, no matter if that block is empty or not"
There are also plenty of missed commas, weird sentence structures and odd word choices. - socialexpert, on 11/18/2008, -0/+4Anyone have a solution to release cache memory as it is built up by a DMA transfer application?
- Zippo, on 11/18/2008, -5/+9...............…………..„--~~""”¯¯¯””~~-„……………………………………...........
…………………..„-~”:::::::::::::::::::::::::”~,………………………………………….
……………….„~”,:::::::::::::::::::::::::::::::::”-,………………………………….......
…………….../;;;;;;|::::::::::::::::::::::::::::::::::::……………………………............
……………..|;;;;;;;/:::::::””~~--::::::::::::::-~~”::……………………………...........
……………./”~,;;/:::::::/¯¯¯¯¯’:::::::::::/’¯¯¯¯’………………………….........
……………. º: ¯:::::::: . . • . ,/::::::::::„ . • . ,/……………………………….......
……………/’::::::::::::::::”~~~”:::::/””~::::’”~~”.::’,………………………………….
………….../:::::::::::::::::::::::::::::::’,__„„/’:::::::::::’………………………………...
…………..|:::::::::::::::::::::::::::::::„----„_„---,::::::::::……DID YOU CHECK YOUR TCP/IP SETTINGS?
…………..|:::::::::::::::::::::::::::„~"----„__„„-“::::::::::|………………………….......
…………..|::::::::::::::::::::::::::/’;;;;;;;;;/::::::::::::::::::|…....ENABLE COOKIES?
………..„~”:::::::::::::::::::::::::__;;;;;;--„::::::::::::::/…………………………........
……..,-“;:; .,::::::::::::::::::::::::’„_¯¯¯„-“:::::::::::::/………………………….........
….„~”;:;:;:;, .”~„::::::::::::::::::::::::¯¯¯:::::::::::::,-“;………………………...........
.,~”;:;:;:;;:;:;:”-, . ”~--„:::::::::::::~--„„___„„~“::::„-‘ . |;:'”~-„…………………………
“;:;:;:;:;:;:;:;:;:;:;”-, . . .”~~---„„„„_______„„„--~” . ./ |;:;:’;:;”-,……………………...
;:;:;:;:;:;:;:;____;:;”-, ~-„ . . . . . . . . /;;;;;’, . . .,/ . |;:,~”;:;:;”-,……………..........
;:;:;:;:;:;:;:;:;:;:;:;/;:;:;:;”~, “~-„_ . . . /„;;;;;;;/”-„~” . . |;:;”~„;:;:;:;’……………….....
;:;:;:;:;:;:;:;:;:;:;:/;:;:;:;:;:;:”~„ . .¯”~-’ . “~,;;;’ . . . . .|;:;:;:;|;:;:;:;:;’…………….....
;:;:;:;:;:;:;:;:;:;:;:;”~--„;:;:;:;:;:”~„ . . . . . .|;;;;;;’ . . . |;:;:;:;/;:;:”~,;:;:………………
;:;:;:;:;:;:;:;:;:;:;:;:;:;:;:”~--„;:;:;:;:”~„ . . . |;;;;;;;;’, . .|;:;:;:/;:;:;:;:;’;:;:………........
;:;:;:;:;:;:;:;:;:;:;:;:;:;:;:;:;:;:;:”~-„;:;:;:”~„ .|;;;;;;;;;;;”~,|;:;:;/;:;:;:;:;:;:;:;:……………
;:;:;:;:;:;:;:;:;:|;:;:;:;:;:;:;:;:;:;:;:;:;:”~-„;:;:”~„;;;;;;;;;;;;/;:;,/’;:;:;:;:;:;:;:;;:;:…...........
;:;:;:;:;:;:;:;:;:|,/;:;:;:;:;:;:;:;:;:;:;:;:;:;:;:;:”~-„;”~„;;;;;;/;:,/;:;:;:;:;:;:;:;:;:;;:;:'……......
;:;:;:;:;:;:;:;:;:/;:;:;:;:;:;:;:;:;:;:;:;:;:;:;:;:;:;:;:;:;”~-„’,;/ ,/;:;:;:;:;:;:;:;:;:;:;:;:;:|…........
;:;:;:;:;:;:;:;:;|;:;:;:;:;:;:;:;:;:;:;:;:;:;:;:;:;:;:;:;:;:;:;:;:¯„/;:;:;:;:;:;:;:;:;:;:;:;:;|;:;:|……….
;:;:;:;:;:;:;:;:;|;:;:;:;:;:;:;:;:;:;:;:;:;:;:;:;:;:;:;:;:;:;:;:;:;:;|;:o;:;:;:;:;:;:;:;:;:::;:|;:;:|...........
;:;:;:;:;:;:;:;:;|;:;:;:;:;:;:;:;:;:;:;:;:;:;:;:;:;:;:;:;:;:;:;:;:;:;|;:;:;:;:;:;:;:;:;:;:;:;:;:|;:;:|……….
;:;:;:;:;:;:;:;:;|;:;:;:;:;:;:;:;:;:;:;:;:;:;:;:;:;:;:;:;:;:;:;:;:;:;|;:;:;:;:;:;:;:;:;:;:;:;:;:|;:;:|……….
_;:;:;:;:;:;:;:;|;:;:;:;:;:;:;:;:;:;:;:;:;:;:;:;:;:;:;:;:;:;:;:;:;:;|;:;:;:;:;:;:;:;:;:;:;:;:;:|;:;:|...........
;:;¯””~~--„„_|_;:;:;:;:;:;:;:;:;:;:;:;:;:;:;:;:;:;:;:;:;:;:;:;:|;:;o;:;:;:;:;:;:;:;:;:;:;|-~/…….....
;:;:;:;:;:;:;:;:;:;:¯””~~----„„„__;:;:;:;:;:;:;:;:;:;:;;:;:;:;|;:;:;:;:;:;:;:;:;:;:;:;:;|~“……… YOU WANT THIS DOG? - mithrasinvictus, on 11/18/2008, -0/+4Dummies don't need to know about cache memory.
- Carret, on 11/18/2008, -0/+4Getting instructions from cache memory is like getting milk from the 7-11 across the street. Getting instructions from main memory is like getting milk from the Costco 10 miles away . It's slowwww. Tutorial done!
- ironiridis, on 11/18/2008, -1/+5Agreed. I do low-level programming, and dabble with compilers and hardware design, and I can tell you that this is very very accurate. It is not straightforward or "for dummies" in any shape or form, though...
- acidandspatter, on 11/18/2008, -0/+3I sat in a 3 hour lecture about memory and cache yesterday. Despite the poor grammar, this has actually helped reinforce the concepts.
Good article. - Napiertt, on 11/18/2008, -0/+2Yeah, yeah...it's written by an engineer :-)
- Myztry, on 11/18/2008, -0/+2Application? Surely that's as OS role.
The Amiga used main memory DMA for everything from disc I/O, audio, blitter, copper, video out, etc. Yet you didn't have to worry about the caching unless you were hitting hardware.
But then the Amiga (OS) was built as a multi DMA, multi processor (co-processors) machine from the start, so it's most likely better designed at handling such things despite it's antiquity. - Zippo, on 11/18/2008, -0/+2In other news, the voice actor who plays Ollie on Family Guy also plays Hermes on Futurama... and Samurai Jack... who know.
- decapsuleur, on 11/18/2008, -1/+3Such a bold statement requires more explanation/proof on your part.
We're waiting.... - InfernoX, on 11/18/2008, -0/+2THEN WHY ISN'T IT WRITTEN IN CAPSLOCKS
- TehDoctor, on 11/18/2008, -0/+1Ok, I'm not sure what you want me to explain, so I'll try a little bit of everything. Firstly, you would never ever want a userspace application to handle DMA/mem caching since all apps are "hidden" from each other via virtual memory, etc. So a single app wouldn't know when another app desperately needs cache memory frames freed up for program data pages to be swapped into. If an application could control the VM system, you have the potential for DOS on other applications, and have a bunch more attack vectors for crackers. This is akin to OS 8 being "cooperatively multitasking", a single application can deny others from accessing a resource they need.
OS X and particularly Windows don't try to use up all available RAM for disk buffers--the RAM draws power whether it's used or not, so you might as well use it, since disk caching greatly improves performance. They also both have a bad habit of swapping out pages that will be used again. Windows (I don't know about OS X) also uses per-process instead of global working sets and does not do directory lookup caching. - mildgreenfairy, on 11/18/2008, -0/+1> Example:
> Taccess(cache) = 1ns, Taccess(main memory)=10ns,
> Hit_Rate=90% (from 100 accesses, 90 will be from cache)
> Taccess (with cache) = 90*1 + 10*1 = 100ns
> Taccess(without cache) = 100*10 = 1000ns
> Speed up = 100/10 = 10
> Increase Hit Rate -> Improve Cache Performance -> Lower Power Consumption -> Improve Speed Execution.
Surely Taccess(with cache) = 90*1 + 10*10 = 190ns ?? - talonstriker, on 11/18/2008, -0/+1When it comes to the replacement policy for overwriting a block in cache w/ one from the main mem, don't you usually replace a random block in the cache, since other methods use up too many clock cycles?
- maleficdog, on 11/18/2008, -0/+1Excellent article.
- RicktheBrick, on 11/18/2008, -0/+1What are l1,l2, and l3 cache memory? When there is a miss does the cache get the memory from main memory or does it go directly to the cpu? No mention of a memory controller. Its job is to maintain all memory and should be important in understanding cache. The only thing an average user needs to know is how much cache is in the next microprocessor and how important it is to satisfy their needs.
- ifknot, on 11/18/2008, -0/+1No it isn't. It's not a very good tutorial at all! Looks like someones personal shorthands notes from a lecture. Here is a much better introduction from Ask A Scientist http://www.newton.dep.anl.gov/askasci/comp99/CS017 ...
- Myztry, on 11/19/2008, -0/+1A terrible design flaw related to caching is with various versions of Windows where the inability to access a drive (scratched optical disc, etc) would result in the whole system locking for the duration.
That was just indescribably amateur of Microsoft. The only application that should be in a wait state/blocked is the application wait for a response from the resource. - TehDoctor, on 11/19/2008, -0/+1I think you're thinking of Windows explorer using a single thread that calls a blocking function, in which case that's not right. A cache can't really block, unless the implementation of caching in NT is radically different from (and much, much worse than) the typical.
- ironiridis, on 11/22/2008, -0/+1By that comparison, getting data from the hard drive's internal cache is like getting milk from the Walmart 12 miles down the street, and from the hard drive platters is like going around the planet six times.
- TehDoctor, on 11/19/2008, -0/+1That's not caching, that's blocking instead of asynchronous I/O.
- Myztry, on 11/19/2008, -0/+1Yes, but presumably it's a (single/master) cache that is blocking, which causes this so any software that needs access to any device stops.
- dekadent30, on 02/11/2009, -0/+0totomix, sts bukmacher http://www.i-bukmacher.pl zakłady bukmacherskie sportowe typy
- wcoenen, on 11/18/2008, -0/+0Buried because I already know how cache works and I still found the article to be confusing. It also has the concepts of spatial and temporal locality backwards: the article defines these as a function of cache behaviour, but these properties exist independently from a cache. Spatial and temporal locality are exploited (not created) by a cache to improve performance. The author understands this but his explanation is sure to confuse dummies.
- TehDoctor, on 11/18/2008, -2/+1You can't? You don't really need to. If you're worried about caching using up RAM, you're worrying about the wrong thing. Honestly, the OS knows better than you what to do with caching things in free memory because it can see *every* process and you can only see one. Well, unless the operating system is Windows or OS X which have terrible caching and VM behavior...
- Icetype, on 11/18/2008, -2/+1If you hit CTRL - twice, you can actually see what that's a picture of.
- Rusty0010, on 11/18/2008, -3/+2Exactly why I failed at maths.
Now its time for lolcatz
*Weeeeeeee*


What is Digg?
Check out the new & improved