摘要
将软件的某些进程结构改造为多线程结构 ,可以解决逻辑并发性、物理并行性等问题 ,显著提高运行效率。但如何改造 (特别是大型软件 )是一个比较困难的事情 ,方法不当很容易造成系统不稳定。该文针对目前该领域研究多局限于理论分析 ,缺少具体实施方法的问题 ,提出了一套在Linux环境下将软件的多进程结构改造成多线程结构的具体方案 ,并围绕改造信号量、信号处理和全局变量等几个难点 ,提出合理的解决方法。最后 ,应用此方法成功地将一个著名开放源代码数据库(PostgreSQL)改造为多线程结构数据库。
Using Multi-threads structures instead of some Multi-processes can solve some technical problems and improve software performance, but how to modify existing, especially large software has some difficulties. Unsuitable methods might destroy the stability of the software. In this paper, we put forward a proper scheme to solve this problem in Linux operation system, especially we raise rational methods to account for such three difficult points: semaphores, signal processing and global variables. We successfully applied the scheme to modify a famous open source DBMS.
出处
《计算机仿真》
CSCD
2004年第9期189-192,共4页
Computer Simulation