摘要
为满足实时测井需求,提高系统资源的利用率和系统性能,在数控测井软件开发中将多线程编程技术应用其中,并对多线程编程技术应用的可行性和必要性进行了分析。给出了软件的模块框图及多线程间关系,利用MFC的自定义类封装和实现各个线程,在线程中分别实现串口通信、数据处理、实时绘图功能,采用事件、消息驱动的方式来调度同步线程。实验结果表明,数控测井软件在使用多线程编程技术后,比未使用多线程技术,提高了CPU 50%的使用效率,每秒处理的最大数据由15组提高到40组,对程序的实时性起到良好的作用。
In order to satisfy the requirement of real-time logging, raise the uhiliazation rate of the resource and improve the performance of the system, multi-thread programming technology was used in the computerized well logging software. In this paper, we analyzed the necessity and feasibility of multi-thread programming technique, found the software module diagram and the relationship between the multi-thread, encapsulated and implemented each thread using general class of MFC, realized the function of serial port communication, data processing, real-time cartography separately in threads, used the event and message to dispatch the synchronize threads. The results show that the numerical control logging software with muhi-thread programming can raise the service efficiency of CPU by 50%, enhance the biggest processing data from 15 to 40 groups each second, which has good effect on the real-time of program.
出处
《电子设计工程》
2011年第1期4-7,11,共5页
Electronic Design Engineering
基金
西安市科技创新支撑计划项目(CXY1009-5)
陕西省教育厅产业化培育项目(09JC16)
关键词
实时
多线程
串口通信
数据处理
real-time
multi-thread
serial communication
data processing