PDA

View Full Version : What is cache memory?


pApA SmerF01
06-08-2005, 03:10 PM
Here you go grindy. anyone else who wants to know what the hell cache memory is, here is my best explanation.

CACHE MEMORY

Pronounced cash, a special high-speed storage mechanism. It can be either a reserved section of main memory or an independent high-speed storage device. Two types of caching are commonly used in personal computers: memory caching and disk caching.
A memory cache, sometimes called a cache store or RAM cache, is a portion of memory made of high-speed static RAM (SRAM) instead of the slower and cheaper dynamic RAM (DRAM) used for main memory. Memory caching is effective because most programs access the same data or instructions over and over. By keeping as much of this information as possible in SRAM, the computer avoids accessing the slower DRAM.

Some memory caches are built into the architecture of microprocessors. The Intel 80486 microprocessor, for example, contains an 8K memory cache, and the Pentium has a 16K cache. Such internal caches are often called Level 1 (L1) caches. Most modern PCs also come with external cache memory, called Level 2 (L2) caches. These caches sit between the CPU and the DRAM. Like L1 caches, L2 caches are composed of SRAM but they are much larger.

Disk caching works under the same principle as memory caching, but instead of using high-speed SRAM, a disk cache uses conventional main memory. The most recently accessed data from the disk (as well as adjacent sectors) is stored in a memory buffer. When a program needs to access data from the disk, it first checks the disk cache to see if the data is there. Disk caching can dramatically improve the performance of applications, because accessing a byte of data in RAM can be thousands of times faster than accessing a byte on a hard disk.

When data is found in the cache, it is called a cache hit, and the effectiveness of a cache is judged by its hit rate. Many cache systems use a technique known as smart caching, in which the system can recognize certain types of frequently used data. The strategies for determining which information should be kept in the cache constitute some of the more interesting problems in computer science.

ANALOGY

imagine you work at starbucks. there's a guy who comes in at exactly 10 a.m. every day and orders the exact same thing. in fact, he doesn't even look at the menu. every single day, a line builds up behind him because you are asking him what he wants and he has to think about it, even though in the end, he's still getting the EXACT same thing EVERY time no matter what.

wouldn't it be nice to just remember EXACTLY what he wants without having to ask him, that way when he walks in at exactly 10 in the morning you can just hand it to him without the line?

there's my best analogy. simple, everyday data stored in the cache so the cpu doesn't have to process it every time it goes through.

Grindstone
08-08-2005, 10:27 AM
Well that is very much appreciated, smerf01- a thread dedicated to me. I feel special. Thanks for the info, I hope it didn't destroy your weekend doing all that research.

Now then, in your opinion, how big or small of a problem is this architectural design (of only have 1 LS cache) going to affect next gen gaming? Is it as bad as the PS3 bottlenecking, or not?

pApA SmerF01
08-08-2005, 11:13 AM
Well that is very much appreciated, smerf01- a thread dedicated to me. I feel special. Thanks for the info, I hope it didn't destroy your weekend doing all that research.

Now then, in your opinion, how big or small of a problem is this architectural design (of only have 1 LS cache) going to affect next gen gaming? Is it as bad as the PS3 bottlenecking, or not?

it's nowhere near as bad. let's put it this way; without a larger cache, you still get to store a lot of running codes and for the others you can't, you can still get the job done with little hit to cpu performance.

with the bottlenecking issues on the ps3, they won't really be able to even embrace next-gen.

the 1MB L2 cache should be enough, but just enough.

Grindstone
08-08-2005, 11:43 AM
On other threads you have mentioned that the PS3 will be running at a peak performance of ~70% because of the bandwidth problem. Within your last missive, you stated that the Xbox 360 may take a hit in performance because of the 1mb of L2 cache, how bad of a hit? Is this hit only if all 3 cores are running, or if only one is running?

pApA SmerF01
08-08-2005, 12:04 PM
On other threads you have mentioned that the PS3 will be running at a peak performance of ~70% because of the bandwidth problem. Within your last missive, you stated that the Xbox 360 may take a hit in performance because of the 1mb of L2 cache, how bad of a hit? Is this hit only if all 3 cores are running, or if only one is running?

it's not a bad hit at all. i just meant that the cpu will have to run through a bit more code than preferred. it's not so much a hit as just a little more work.

Grindstone
08-08-2005, 12:14 PM
So then we can still anticipate the ~98% efficiency. Okay, I reckon I am satisfied... for now.

citizen X
08-08-2005, 09:37 PM
Here you go grindy. anyone else who wants to know what the hell cache memory is, here is my best explanation.

CACHE MEMORY

Pronounced cash, a special high-speed storage mechanism. It can be either a reserved section of main memory or an independent high-speed storage device. Two types of caching are commonly used in personal computers: memory caching and disk caching.
A memory cache, sometimes called a cache store or RAM cache, is a portion of memory made of high-speed static RAM (SRAM) instead of the slower and cheaper dynamic RAM (DRAM) used for main memory. Memory caching is effective because most programs access the same data or instructions over and over. By keeping as much of this information as possible in SRAM, the computer avoids accessing the slower DRAM.

Some memory caches are built into the architecture of microprocessors. The Intel 80486 microprocessor, for example, contains an 8K memory cache, and the Pentium has a 16K cache. Such internal caches are often called Level 1 (L1) caches. Most modern PCs also come with external cache memory, called Level 2 (L2) caches. These caches sit between the CPU and the DRAM. Like L1 caches, L2 caches are composed of SRAM but they are much larger.

Disk caching works under the same principle as memory caching, but instead of using high-speed SRAM, a disk cache uses conventional main memory. The most recently accessed data from the disk (as well as adjacent sectors) is stored in a memory buffer. When a program needs to access data from the disk, it first checks the disk cache to see if the data is there. Disk caching can dramatically improve the performance of applications, because accessing a byte of data in RAM can be thousands of times faster than accessing a byte on a hard disk.

When data is found in the cache, it is called a cache hit, and the effectiveness of a cache is judged by its hit rate. Many cache systems use a technique known as smart caching, in which the system can recognize certain types of frequently used data. The strategies for determining which information should be kept in the cache constitute some of the more interesting problems in computer science.

ANALOGY

imagine you work at starbucks. there's a guy who comes in at exactly 10 a.m. every day and orders the exact same thing. in fact, he doesn't even look at the menu. every single day, a line builds up behind him because you are asking him what he wants and he has to think about it, even though in the end, he's still getting the EXACT same thing EVERY time no matter what.

wouldn't it be nice to just remember EXACTLY what he wants without having to ask him, that way when he walks in at exactly 10 in the morning you can just hand it to him without the line?

there's my best analogy. simple, everyday data stored in the cache so the cpu doesn't have to process it every time it goes through.

Good analogy :tee:

I couldn’t say it better my self, I see your starting to use colors,


I’m such a trend setter. :rolleyes: :D: ;)

pApA SmerF01
09-08-2005, 10:46 AM
Good analogy :tee:

I couldn’t say it better my self, I see your starting to use colors,


I’m such a trend setter. :rolleyes: :D: ;)

hey, i had to make it all flashy and yes man, you're a trend setter. i remember you with those beanie babies i used to criticize you about...you jerk and your millions! j/k.

Blank
09-08-2005, 01:27 PM
Great analogy, mate. Thanks for clearing it up :)

pApA SmerF01
09-08-2005, 02:01 PM
no prob. if you have any hardware q's just ask away.

Grindstone
09-08-2005, 02:13 PM
Well, if you're up to it, you could make a thread about anti-alaising and the difference it makes and how PS3 screwed the pooch on that option as well. I mean, if you think you have the time for it...

pApA SmerF01
09-08-2005, 02:36 PM
Well, if you're up to it, you could make a thread about anti-alaising and the difference it makes and how PS3 screwed the pooch on that option as well. I mean, if you think you have the time for it...

looks like citizen x will be answering that one. we take turns on that kinda shtuff.

just look for a new thread from him! ;)