📜  缓冲区和缓存的区别

📅  最后修改于: 2021-09-10 03:07:39             🧑  作者: Mango

1. 缓冲:
缓冲区是一个临时存储区域,通常是内存中的一个块,在等待从输入设备或输出设备传输时放置项目。它主要用于输入/输出过程。例如,如果您要打印一个长文档,您不希望 CPU 等待询问打印机“您准备好再打印一段了吗?”相反,CPU 将用文档数据填充内存缓冲区,指示打印机打印缓冲区内容,然后返回其他业务。

2.缓存:
高速缓存是计算机中插入 CPU 和主内存之间的更小、速度更快的内存组件。为了使这种安排有效。缓存需要比主存快得多。这种方法比使用快速存储设备来实现整个主存储器更经济。

缓冲区和缓存的区别:

S.No. BUFFER CACHE
1. Buffer is used to compensate for difference in speed between two processes that exchange or use data. Cache is a smaller and fastest memory component in the computer.
2. It is mostly used for input/output processes. It is used during reading and writing processes from the disk.
3. It is a normal storage area on ram for temporary storage. It is a high-speed storage area for temporary storage.
4. It stores the original copy of data. It stores the copy of original data.
5. It is always implemented in the main memory (RAM). It is implemented in RAM as well as in Disk.
6. It is made from dynamic ram. It is made from static ram.
7. It does not increase the accessing time. It increase the accessing speed of CPU.
8. It can be used in keyboards to edit typing mistakes . It does not posses such feature.