发明名称
摘要 In a client/server system, a method and apparatus for a listening daemon to distribute work and client connectivity across multiple processes each supporting multiple threads. Upon receiving a request from a client, a listening daemonaccepts the conversation, thus creating a socket. The listening daemon then does a putwork( ) call which places a work request on a system managed work queue. The work request behaves in a manner very similar to spawn in that it provides for parameters to be passed as well as transfer of ownership of the socket. In the meantime, server processes that are created either manually or by the operating system create multiple threads, which invoke a getwork( ) service to retrieve work requests created by the listening daemon. The getwork( ) service transfers the socket to the calling process and notifies the thread which file descriptors it has inherited. The thread is then able to process the client request and respond directly to the client without requiring an intermediate process to provide the communication link. The present invention allows a server in a client/server system to spread the workload across multiple threads in multiple processes, avoiding the creation of too many processes or too many threads in a single process. The direct transfer of the socket eliminates the unnecessary overhead typically required to rebind a new process to the client application.
申请公布号 JP3251902(B2) 申请公布日期 2002.01.28
申请号 JP19980068531 申请日期 1998.03.18
申请人 发明人
分类号 G06F9/46;G06F9/50;G06F9/54;G06F15/16;G06F15/177;(IPC1-7):G06F9/46 主分类号 G06F9/46
代理机构 代理人
主权项
地址