发明授权
- 专利标题: Determining whether to retain or terminate a thread based on a minimum number of threads in a thread pool and a maximum number of threads allowed waiting on the channel
- 专利标题(中): 确定是否基于线程池中的最小线程数和允许在通道上等待的最大线程数来保留或终止线程
-
申请号: US11852039申请日: 2007-09-07
-
公开(公告)号: US08122449B2公开(公告)日: 2012-02-21
- 发明人: Steven M. Berman , Thirumale Niranjan , Michael Wayne Young
- 申请人: Steven M. Berman , Thirumale Niranjan , Michael Wayne Young
- 申请人地址: US NY Armonk
- 专利权人: International Business Machines Corporation
- 当前专利权人: International Business Machines Corporation
- 当前专利权人地址: US NY Armonk
- 代理机构: Konrad Raynes & Victor LLP
- 代理商 Janaki K. Davda
- 主分类号: G06F9/46
- IPC分类号: G06F9/46 ; G06F15/16
摘要:
Provided are techniques for workload balancing. A message is received on a channel. A thread in a thread pool is selected to process the message. In response to determining that the message has been processed and a response has been sent on the channel by the thread, it is determined whether a total number of threads in the thread pool is greater than a low water mark plus one and whether the channel has more than a maximum number of threads blocked on a receive, wherein the low water mark represents a minimum number of threads in the thread pool. In response to determining that a number of threads in the thread pool is greater than the low water mark plus one and that the channel has more than the maximum number of threads blocked on a receive, the thread is terminated. In response to determining at least one of the number of threads in the thread pool is less than or equal to the low water mark plus one and the channel has less than or equal to the maximum number of threads blocked on a receive, the thread is retained.
公开/授权文献
- US20090070766A1 DYNAMIC WORKLOAD BALANCING IN A THREAD POOL 公开/授权日:2009-03-12