[omniORB] One more multi-thread question

Luo Yongheng langsir at yeah.net
Wed Jan 2 18:12:26 GMT 2008


Hi,

Here is one question still regarding multi-thread mode:

I use multi-thread mode on server side. Assume that we have one servant
incarnated, does that mean all running threads/tasks enters the same
memory/code area of the servant in the main process? since all the
threads/tasks share the same memory image of the main process.

Futhre, if we incarnate one more servant whose implementation is the
same as the previous one, does that still mean all threads/tasks enters
the same memory area as previous one? Because functions of different
objects of the same class just shares the same memory area, and the only
difference is the implicit 'this' pointer passed as the parameter.

So can we conclude that incarnating more than one servants of the same
implementation class does not help improve the multi-thread efficiency?

Thanks.

Thierry from Beijing, China


----- Original Message ----- 



> On Friday 21 December, "=?gb2312?B?wt4=?=" wrote:
> 
>> omniORB server supports to upcall application codes through multi
>> threads. If I have only one servant activated in the main thread, and
>> I configured thread pool mode on the server side, does every invoked
>> thread incarnate one more servant to serve the incoming requests? Or,
>> only one servant serves all threads' incoming requests?
> 
> If you just activate one servant, then that single servant will be used
> for all the incoming requests concurrently. That's true regardless of
> whether you use thread pool mode or the default thread per connection
> mode.
> 
> In CORBA, the system never automatically incarnates servants for you.
> If that's what you want, you must explicitly create and configure a
> servant manager.
> 
> Cheers,
> 
> Duncan.
> 
> -- 
> -- Duncan Grisby         --
>  -- duncan at grisby.org     --
>   -- http://www.grisby.org --




More information about the omniORB-list mailing list