Groups
Groups
Sign in
Groups
Groups
《linux环境编程》讨论组
Conversations
Labels
About
Send feedback
Help
服务器设计
53 views
Skip to first unread message
dhg416...@gmail.com
unread,
Jul 20, 2016, 11:26:24 PM
7/20/16
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to 《linux环境编程》讨论组
Linux后台服务器设计时多进程 、’多线程应如何选择,它们的优劣?
Gao Feng
unread,
Jul 21, 2016, 2:37:10 AM
7/21/16
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to 《linux环境编程》讨论组
具体的设计是与业务相关。
多进程的好处:一个进程死了,其它进程照样没事。只要有个monitor,可以保证服务永不死。其它的好处嘛。。。有着一个还不够臭屁的?
多进程的坏处:进程间通信麻烦。为了高效使用share memory,也有不方便之处。
多线程的好处:线程间通信太方便了。。。。坏处,一个死了,就全死全家。。。
gavin
unread,
Sep 13, 2016, 12:43:37 AM
9/13/16
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to 《linux环境编程》讨论组
如果任务相互独立,没有相互依赖,多进程好点,但是资源嘛,就占的多点
在 2016年7月21日星期四 UTC+8上午11:26:24,
dhg416...@gmail.com
写道:
Linux后台服务器设计时多进程 、’多线程应如何选择,它们的优劣?
Gao Feng
unread,
Sep 18, 2016, 9:35:01 AM
9/18/16
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to 《linux环境编程》讨论组
没有资源共享,也没有通信的需求,多进程稳定;
不过我一般都喜欢多线程,然后绑定到不同的cpu上。
Reply all
Reply to author
Forward
0 new messages