Problem Statement
Differentiate cache versus buffer in the context of I O and memory systems.
Explanation
A cache is a small fast memory that stores copies of frequently accessed data or instructions to reduce access latency, often between CPU and main memory. A buffer is a temporary storage area used when data is moving between two devices or between device and memory, often to accommodate speed mismatch. The key difference is purpose: caching aims for reducing access time by exploiting locality, buffering aims for smoothing data transfer. In I O systems you might buffer disk writes and also cache disk reads; distinguishing these roles and trade-offs shows thorough understanding in interviews.
