anyone intelligent enough for this?
January 8, 2008 6:24am CST
what is the difference between a cache and a buffer? I have been asked this question in ma campus interview and I am yet to find the answer. I think there is no difference...but there must be..unless the interviewer asked it to get rid of me.. But he took me in.
8 Jan 08
Of course, there's a difference. A cache is a very fast memory module which is connected to the CPU and has an access spped approximately equal to it. The cache is used to speed up the operations within the CPU. If the CPU had to access the main memory for all its operands, then processing speed would have been much lower as the access speed of the maain memory is very high compared to the cache memory. The cache memory acts an interface between the CPU and main memory. On the other hand, a buffer is a temporary storage memory module which is attached to all slow-acting peripherals like keyboard, printer etc. attached to the CPU. As the peripherals cannot work at a speed comparable to that of the CPU, so they need a memory to store the data that is being sent to/from the CPU. That function is performed by the buffer. I hope this will serve to clear things up. Cheers.
1 person likes this
• United States
12 Mar 08
Buffers are usually used in software to store register info temporarily, while the program is executing some associated subroutines. These buffers are normally quite small, often not more than 128 or 256 bytes. Caches are usually bigger and in the magabytes. Hard drives have 4MB, 8MB, 16MB and some are going into 32MB buffers to store data between the slow HDD storage access and the faster main RAM.
8 Jan 08
actually, a cache is a buffer. but cache used to be connect to CPU. when data input/ouput the CPU,called this buffer is cache. when data transfer from serier port or communicate with other device,wo call the buffer is buffer. i'm sorry my english is so bad. i hope u can understand me.