📜  寄存器和缓冲区的区别

📅  最后修改于: 2021-09-12 11:24:40             🧑  作者: Mango

1.注册:
寄存器是内置于处理器本身的最小保存数据元素。这些是处理器可以直接访问的内存位置。它保存大约 32 位到 64 位的少量数据,并且可以保存一条指令、一个存储地址或任何类型的数据,例如位序列或单个字符。

例如:累加器寄存器、程序计数器、指令寄存器、地址寄存器等。

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

寄存器和缓冲区的区别:

S.No. Register Buffer
1. Registers is a small amount of fast storage element into the processor. Buffer is used to compensate for difference in speed between two processes that exchange or use data.
2. It is located on the CPU. It is an area of RAM .
3. It is used to store and retrieve information from them. It is mostly used for input/output processes.
4. It holds operands or instruction that CPU is currently processing. It holds data for advance processing.
5. It is used to store data temporarily for processing and transfer. It is used to store data temporarily before using them.
6. It increase the accessing speed of CPU. It does not increase accessing time.
7. Loop counters is example of register. Streaming music or streaming video is example of buffer.