摘要
针对常用环形缓冲区读写数据运行效率低的弊端,提出了一种快速读写环形缓冲区数据的方法。在读写缓冲区数据时,通过位与逻辑运算修改读写指针值,利用读写指针的差值作为缓冲区有效数据个数实现环形缓冲区状态判断。通过仿真测试实验和测试数据分析,这种快速读写环形缓冲区的方法可以显著提高系统运行效率。
In view of the low efficiency of reading and writing data in the common ring buffer,a fast method for reading and writing ring buffer data is proposed.When reading and writing buffer data,modify the read and write pointer value through bit and logic operations,and use the difference between the read and write pointers as the number of effective data in the buffer to determine the status of the circular buffer.Through simulation testing experiments and data analysis,this fast method of reading and writing ring buffers can significantly improve the efficiency of system operation.
作者
樊利军
田柏林
彭淑梅
FAN Lijun;TIAN Bolin;PENG Shumei(School of Information Engineering,Beijing Polytechnic College,Beijing 100042,China;Beijing Coal Mining Electric Equipment and Technique Development Co.,Ltd.,Beijing 100042,China;School of Fundamental Education,Beijing Polytechnic College,Beijing 100042,China)
出处
《北京工业职业技术学院学报》
2024年第1期6-10,共5页
Journal of Beijing Polytechnic College
基金
2019年北京工业职业技术学院应用性招标课题(BGY2019KY-05ZY)
2023年北京工业职业技术学院科研课题(BGY2023KY-53)。