而且,对于那些受益于文件系统预读功能或者较高缓冲区缓存命中率的应用程序,可能会出现性能的降低。
Further, applications that might benefit from having a file system read ahead or high buffer cache hit rates might actually see performance degradation.
为了说明这一情况,让我们研究一个简单示例,该示例演示了从同一个缓冲区读和写一个字符。
Having said that, let's examine a quick example to demonstrate writing and reading a char from the same buffer.
必须首先创建一个缓冲区,先填充它,然后将位置倒回起始点,这样才能从头读。
You first must create the buffer, fill it, then rewind the position to the beginning so you can read from the start.
共享内存区域的一个作用是充当缓冲区,以减少对磁盘的读操作。
One purpose of the shared memory area is to act as a buffer, minimizing the necessity for further reads from disk.
当监视应用程序试图执行另一次select或阻塞的read调用时,这些调用会立即返回,因为缓冲区中有未读的事件发生数据。
Once the monitoring application attempts another select or blocking read , those calls will return immediately since there is unread event occurrence data waiting in the buffer.
在读取方面使用中间内核缓冲区,可以允许内核缓冲区在应用程序不需要内核缓冲区内的全部数据时,充当 “预读高速缓存(readahead cache)” 的角色。
Using the intermediate buffer on the read side allows the kernel buffer to act as a "readahead cache" when the application hasn't asked for as much data as the kernel buffer holds.
这是一个双缓冲,因为有“进步”的缓冲区用于更新的房间,以及拥有最终的图像从上一帧缓冲,这是由监视器读。
It's a double-buffer, because there's room for the "in-progress" buffer used for the updates, as well as the buffer that holds the final image from the last frame, that's being read by the monitor.
虽然目的地主机可能有消息缓冲区,缓冲区之前可能成为完整的新的数据包可以读一个更高级别的应用程序。
Although a destination host may have a message buffer, the buffer may become full before new packets can be read by a higher-layer application.
应用程序将读实际的寄存器数值(如adc电压),并且存储在特定的缓冲区中。
The application should then read the actual register values (for example the ADC voltage) and should store the result in the supplied buffer.
应用程序将读实际的寄存器数值(如adc电压),并且存储在特定的缓冲区中。
The application should then read the actual register values (for example the ADC voltage) and should store the result in the supplied buffer.
应用推荐