multithreading over HPUX

Frank Fock Frank.Fock____t-online.de
Fri Apr 18 19:49:57 CEST 2003


Hi Leonardo,

The update method is called during lookup of the
appropriate target MIB object responsible for processing
a particular sub-request. The lookup needs to be
synchronized by Mib::lock_mib() to prevent modifications
to the (virtual) MIB tree while the lookup is being
processed.

That is why you do not see any parallel execution of
requests when you stop one thread in the update method
(note: other requests that have already passed the lookup
phase and will be processed though).

If your "update" takes a long time it could be better if
you do a prefetch of your table that is performed in
background.

Hope this helps.

Best regards,
Frank

Leonardo Borelli wrote:
> Hi all,
>  
> I'm trying to use the multithreaded agent over an HPUX station. My 
> compile options are the following,
>  
> - snmp ++ : -DRWSTD_MULTI_THREAD -D_REENTRANT -D_THREADS
> - agent ++ : -DRWSTD_MULTI_THREAD -D_REENTRANT -D_THREADS
> - "myAgent" : -D_THREADS -D_DEBUG +noeh -w -D_ACC_STL +DAPortable +Z 
> -DHP_UX_B_11_00 -DOS_HPUX_11_00 ......others....
>  
> My data is retrieved from another process, by socket messages. In order 
> to retrieve this data I've modified the "update" method in order to 
> update only the rows being requested.
> Just to test multithreading, I've "stopped" a get response (by stopping 
> the response message sent by the previously mentioned "data process") 
> and performed another get request (on a different table):
> I'm expecting for a different "process_request(req)" call, but (also 
> from output)...... everything seems to be stopped. I've noticed that, if 
> I send the first get response message to the agent, then the second get 
> request is processed.
>  
> ...any comments?
>  
>  
> thanks in advance
>  
> Leonardo






More information about the AGENTPP mailing list