views:

44

answers:

3

can annbody detail - Whatis the difference between Buffer and Cache in system memory ?

+5  A: 

A buffer is just a container to hold data for a short period of time when more comes in at any given time than a consumer can use / process. It's a first-in, first-out situation - the data comes in, might be buffered, and goes out in the same order it came in, after a while.

A cache is a storage for speeding up certain operations. Things get put in a cache, and should be retrieved from it multiple times, over and over again. There's no "flowing through the cache" kind of mechanism - data doesn't come in and go out in the same order - but it's just a holding container. The order might be anything, really - items are addressed via a key, they don't "flow through" but they are "put in" and stay there (until they're thrown out because of not being used, or because the system goes down).

marc_s
thanks Marc, its clear now
Dhiva
+1  A: 

A buffer is a contemporary collection of location where a huge amount of data is managed or disassembled. This may be basic for interaction with a set of collection device that needs huge blocks of information, or when data must be given in a many way than that in which it is made, or rarely considerable when less blocks are not sufficient. The advantage is here even if the buffered data are stored to the buffer in one time and get from the buffer once.

A cache, on the other side, thinks that the data will be get from the cache more one time than they are written on them. Its aim is to less the accesses to the underlying stock. Buffer is a programmable cache managed by the operating system in the main storage and is used to have the most necessary data from disk, so that they don't have to be gotten again from the memory. This feature is available by the operating system. While cache is in real a hardware that the CPU uses to reduced the effective memory access time.

Martin Fabik
I got the clear differecen Martin thank a lot
Dhiva
A: 

A buffer is just like a drum it can hold data n flush it out ... On the other hand Cache is used to fasten your operation

Wahib Idris