没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论













第
31
卷第
3
期
2012
年
9
月
武 汉 工 业 学 院 学 报
Journal of Wuhan Polytechnic University
Vol. 31No. 3
Sep. 2012
收稿日期
: 2012-05-18.
作者简介
:
梁明刚
( 1986-) ,
男
,
硕士研究生
,E-mail: 501253524@ qq. com.
通讯作者
:
陈西曲
( 1971-) ,
男
,
副教授
,E-mail: cxqdhl@ 21cn. com.
基金项目
:
湖北省自然科学基金项目
( 2011CHB030) .
文章编号
: 1009-4881( 2012) 03-0054-06
DOI
: 10. 3969 /
j. issn.
1009-4881. 2012. 03. 014
Linux
下基于
epoll +
线程池高并发服务器实现研究
梁明刚
,
陈西曲
(
武汉工业学院 电气与电子工程学院
,
湖北 武汉
430023)
摘 要
:
在介绍
linux
系统下基于
TCP / IP
协议的
socket
网络编程的客户端和服务器
( client /
server)
基本模型
、
线程池和
epoll
机制的基础上
,
给出了基于
epoll +
线程池高并发服务器设计
的详细算法
。
最后
,
给出一个在
linux
环境下用
C
语言编写的基于
epoll
和线程池技术的服务
器和客户端实验程序
,
实现了服务器和客户端之间并发通信以及实验结果的截图
。
实验结果
表明
,
基于
epoll +
线程池技术设计出来的高并发服务器能够保证服务器和客户端之间稳定高
效的通信
。
关键词
: linux
系统
;
高并发服务器
;
线程池
; epoll
机制
中图分类号
: TP 312
文献标识码
: A
The researchon realization of high concurrent server
base on epoll plus threadpool in Linux
LIANG Ming-gang,CHEN Xi-qu
( School of Electrical and Electronic Engineering,WuHan Polytechnic University,Wuhan 430023,China)
Abstract: This paper describles the normal client and server ( client /server) model of network co mmunication pro-
gram based on the technology of socket with TCP /IP protocol,the technology of threadpool and epoll mechanism.
And then it gives the detail algorithm with the technology of threadpool and epoll to accomplish the high concurrent
server. In the end ,this paper exhibits an application example based on the algorithm ,which is written by C lan-
guage ,in the Linux system and the result photos. The result shows that the concurrent server with the technology o f
epoll plus threadpool can make sure the communication between server and clients is stable and efficient.
Key words: Linux; high concurrent server; threadpool; epoll mechanism
在数字化
、
网络化和信息化的当今
,
计算机网络
技术得到了飞速的发展和广泛的应用
[1]
。
在
TCP /
IP
网络应用中
,
通信的两个进程间相互作用的主要
模式是客户机
/
服务器模式
( client / server)
即客户机
向服务器提出请求
,
服务器接收到请求后提供相应
的服务
。
而基于流式套接字
( SOCK_STREAM)
的并
发服务器是目前
linux
网络服务器主流形式
。
随着
网络技术快速进入各行各业
,
服务器的并发请求量
也成几何级数增加
,
并且对服务器的实时性和可靠
性的要求也越来越高
。
而传统基于多进程和
select
机制的并发服务器由于受到系统硬件资源和
linux
内核版本的限制
,
已经不能满足高实时性
、
高可靠性

妖孽横生
- 粉丝: 32
- 资源: 145
上传资源 快速赚钱
我的内容管理 展开
我的资源 快来上传第一个资源
我的收益
登录查看自己的收益我的积分 登录查看自己的积分
我的C币 登录后查看C币余额
我的收藏
我的下载
下载帮助


最新资源
- 信息系统应急预案管理制度
- 基于C++从0到1手写Linux高性能网络编程框架.txt
- 2023-2024-1Python复习题库给学生(1).docx
- rt-thread-code-stm32f411-weact-blackpill.rar,stm32f411-weact-bla
- 失效模式及影响分析FMEA手册设计FMEA流程FMEA监控和系统响应的补充FMEA
- NVIDIA-Linux-x86-64-525.147.05.run
- 技术的智能农业发展前景展望.pptx
- rt-thread-code-stm32f411-st-nucleo.rar探索者 STM32F411-Nucleo-64
- csharp-wpf.rar
- 南宁(1).zip
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈



安全验证
文档复制为VIP权益,开通VIP直接复制

- 1
- 2
- 3
- 4
前往页