From: cbsmith@ccnga.watserv2.uwaterloo.ca
Subject: DCE, multithreading & pthread_self()
Date: Wed, 25 Aug 1993 15:27:29 GMT [thread overview]
Message-ID: <CBSMITH.93Aug25112729@ccnga.watserv2.uwaterloo.ca> (raw)
Hello there. I'm playing around with stub code generated by the IDL
compiler. (I know.... DON'T TOUCH!! :-)
I am using a very simple RPC model (two remote procedures: one adds two
number and one multiply's two numbers). As the server can have multiple
calls running at the same time, I figured the best way to differentiate
each of the calls to the server was to have the stub code call
pthread_self(). However, I have discovered that even when I make a lot
of RPC calls (say 40) at approximately the same time (I did it the easy
way: started up 20 clients in the background on one machine) I'm
unlikely to have more than a few different return values for
pthread_self().
I've hypothesized that the server does not generate a new thread ID for
each RPC call it receives, but rather has a number of worker threads
running all the time which receive RPC calls and execute them. Any calls
beyond the limit imposed by DCE (presumably matching the number of
worker threads) are placed in a queue.
Is this correct, and if so, how would one go about creating unique ID's
for each RPC call that is received. From the programmers point of view
at least, each of these calls seem to be threads in the server process.
The programmer doesn't really deal with worker threads and such.
I haven't actually implemented my own explicit multithreading in my
server code, but if I *did* (I am planning to) it would make the whole
process even more confusing. (Is a new thread going to be handled by a
worker thread [old thread ID], or is it going to generate an entirely new
thread in the server [new thread ID]?)
Anyway, help on this manner would be appreciated.
--Chris
P.S.: I'm using DCE 1.0 on AIX
--
Christopher Smith
cbsmith@boomer.uwaterloo.ca
cbsmith@undergrad.math.uwaterloo.ca
DC 3527
(519) 885-1211x3581
next reply other threads:[~1993-08-25 15:27 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
1993-08-25 15:27 cbsmith [this message]
1993-08-25 17:30 ` DCE, multithreading & pthread_self() Rich Salz
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox