摘要
基于单生产者多消费者模型,剖析传统环形缓冲区写入和读出进程并发操作的缺陷,提出一种带有缓冲区单元状态标记的算法,解决环形缓冲区写入和读出进程的同步问题。定量分析产生环形缓冲区性能瓶颈的条件,在不满足该条件的情况下,环形缓冲区的性能会有大幅提升。对比实验和数学分析验证了该环形缓冲区处理数据包的性能较好。
Based on the model of single producer multiple consumers, the drawback of the writing concurrency and reading processes in traditional ring buffer is analysed. An algorithm with tagged buffer unit status is presented to solve the synchronization problem of writing and reading processes in the ring buffer. And the condition resulted in the bottleneck of the ring buffer performance is analysed quantificationally. The performance of the ring buffer is promoted greatly if the condition does not be met. Contrastive experiment and mathematical analysis verify that the performance of data packet processing in the ring buffer is better.
出处
《计算机工程》
CAS
CSCD
2012年第8期228-231,共4页
Computer Engineering
基金
科技部国际科技合作基金资助项目(2007DFR10420)
重庆市自然科学基金资助项目(2008BB2307)