计算机应用 ›› 2011, Vol. 31 ›› Issue (10): 2593-2596.DOI: 10.3724/SP.J.1087.2011.02593

• 先进计算 •    下一篇

信号实时采集系统的最佳并行线程数的研究

王科特,王力生   

  1. 同济大学 电子与信息工程学院,上海 201804
  • 收稿日期:2011-04-25 修回日期:2011-07-01 发布日期:2011-10-11 出版日期:2011-10-01
  • 通讯作者: 王科特
  • 作者简介:王科特(1986-),男(满族),吉林辽源人,博士研究生,主要研究方向:多线程并行计算、基于Skeleton骨架的并行编程模式;王力生(1957-),男,河南温县人,教授,博士生导师,主要研究方向:体系结构、嵌入式系统、多线程并行计算、IP软核。

Research on optimal thread quantity of real-time signals acquisition system

WANG Ke-te, WANG Li-sheng   

  1. College of Electronic and Information Engineering, Tongji University, Shanghai 201804, China
  • Received:2011-04-25 Revised:2011-07-01 Online:2011-10-11 Published:2011-10-01
  • Contact: Ke-Te WANG

摘要: 为解决多核环境下,信号采集系统的数据处理实时性问题,提高波形数据采集和数据显示速度,提出使用裸线程构建数据采集模块和数据处理模块的最佳线程分配数量的最优线程分配算法,其目的在于合理分配线程给各个模块,达到系统的最佳性能。该算法基于生产者-消费者模式、操作系统多线程时间片轮转调度策略,根据各模块的工作量酌情调节线程比例,使应用程序达到最高加速比。实验表明,在双核环境下,该最佳线程数算法计算出最佳线程组合,使采集波形数据和数据显示合理并行化,相对于其他的线程组合分配方式完成程序花费的时间更少,提高了系统加速比、运算性能以及实时性。通过最优线程分配算法,提供了最优的线程数量分配方案,提高并行程序执行效率,减少了不必要的线程开销,提高了波形信号采集实时性。

关键词: 多核, 多线程, 实时信号采集, 最佳线程数, 现场可编程门阵列, 加速比

Abstract: Aim at solving the problem of data processing and data demonstration in real-time signals acquisition system in multi-core and multi-thread environment, the authors exploited an efficient algorithm which used bare threads to build data acquisition module and data processing module with a set of optimal threads for allocation in order to make full use of parallel computation to increase the performance and real-time quality of the system. This algorithm worked based on producer-customer and the round-robin scheduling of operating system, referring to the workload of each module to tune the thread allocation solution to make the application achieve better speed-up ratio and real-time quality. The testing result of Field Programmable Gate Array (FPGA) hardware simulation system shows that in dual core environment, this algorithm can produce best combination of threads allocation with which waveform acquisition module and waveform display module can be executed in optimal parallel mode. And compared with other solutions of thread allocation, this solution spends less time in execution. Thus, this algorithm improves the speed-up ratio, computing and the real-time quality of the system. The optimal thread allocation algorithm provides the solution of optimal thread allocation which improves the efficiency of parallel application execution, reduces unnecessary spending of the thread and improves the real-time quality of waveform signal acquisition.

Key words: multi-core, multi-thread, real-time signal collection, optimal thread quantity, Field Programmable Gate Array (FPGA), speed-up ratio

中图分类号: