本文已被:浏览 1460次 下载 2210次
Received:July 29, 2015 Revised:October 08, 2015
Received:July 29, 2015 Revised:October 08, 2015
中文摘要: 当较大规模客户端并发请求服务器端应用程序时,传统的为每个请求创建线程的解决方法会导致服务器端性能的严重下降甚至死机.通过分析JDK的Executor框架,从工作原理、核心线程池对象、执行策略等方面详细描述了线程池模型,应用到一个三层C/S架构的在线考试系统中,给出了服务端的设计架构和实现代码.通过仿真测试证明了线程池技术在解决较大并发访问方面的稳定性.
中文关键词: 线程池 Executor框架 在线考试系统
Abstract:When large-scale client requests for applications in server concurrently, traditional solutions create a thread for every request, which will lead to a serious decline in server performance and even crash. By analyzing the JDK's Executor framework, the paper described in detail thread pool model from the principle of work, core thread pool object, implementation strategy and other aspects, applied the thread pool to a online examination system of three-layer C/S architecture, and gave the server's design framework and implementation code. Through simulation tests, the stability of the thread pool technical in the process of solving large concurrent access is proved.
文章编号: 中图分类号: 文献标志码:
基金项目:咸阳师范学院专项科研计划(2012XSYK070)
引用文本:
葛萌,于博,欧阳宏基.线程池技术在考试系统中的应用.计算机系统应用,2016,25(4):107-111
GE Meng,YU Bo,OUYANG Hong-Ji.Application of Thread Pool Technology in Examination System.COMPUTER SYSTEMS APPLICATIONS,2016,25(4):107-111
葛萌,于博,欧阳宏基.线程池技术在考试系统中的应用.计算机系统应用,2016,25(4):107-111
GE Meng,YU Bo,OUYANG Hong-Ji.Application of Thread Pool Technology in Examination System.COMPUTER SYSTEMS APPLICATIONS,2016,25(4):107-111