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. |