*BSD News Article 47025


Return to BSD News archive

Xref: sserve comp.unix.solaris:41850 comp.unix.internals:8799 comp.unix.programmer:27147 comp.unix.sco.programmer:452 comp.os.linux.development.apps:4533 comp.unix.bsd.freebsd.misc:3321
Path: sserve!newshost.anu.edu.au!harbinger.cc.monash.edu.au!news.cs.su.oz.au!metro!news.ci.com.au!wabbit.cc.uow.edu.au!news.tansu.com.au!mail_gw.fwall.telecom.com.au!cdn_mail.telecom.com.au!copc.netsys.itg.telecom.com.au!coakley
From: coakley@vitgnos1.telecom.com.au (Craig Oakley)
Newsgroups: comp.unix.solaris,comp.unix.internals,comp.unix.programmer,comp.unix.sco.programmer,comp.os.linux.development.apps,comp.unix.bsd.freebsd.misc
Subject: Re: POSIX Threads package for ix86 and SPARC
Followup-To: comp.unix.solaris,comp.unix.internals,comp.unix.programmer,comp.unix.sco.programmer,comp.os.linux.development.apps,comp.unix.bsd.freebsd.misc
Date: 19 Jul 1995 22:46:25 GMT
Organization: RAD-DD Project Telstra Australia
Lines: 46
Distribution: inet
Message-ID: <3uk201$reo@cdn_mail.telecom.com.au>
References: <3tarhp$39e@gwsun.medinf.mu-luebeck.de> <QjyUYVy00YUyAL31dE@andrew.cmu.edu> <3u0n48$89l@kruuna.helsinki.fi> <3u98kq$p38@mystech.mystech.com>
Reply-To: rmaco@gauss.ma.rmit.edu.au
NNTP-Posting-Host: copc.netsys.itg.telecom.com.au
X-Newsreader: TIN [version 1.2 PL2]

jcrupi@mystech.com wrote:
: We are using Solaris 2.4 threads, which are pretty easy to use.
: To make our RPC server multi-threaded, all we do is make the following
: call :

: int mode = RPC_SVC_MT_AUTO;
: rpc_control (RPC_SVC_MTMODE_SET, &mode);
: svc_run ();

: This sets RPC in multithreaded mode.  Then all we do is put a
: few mutexes around to lock.  Does pthreads support this ? (ie RPC ).

POSIX Therads (pthreads) is only a threading architecture, not an RPC
mechanism.

If your code is thread safe (you can do this with the mutexes you mentioned),
it will cope quite comfortably with RPC's.

The implementation of threads on HP-UX swaps runs a thread scheduling thread
as the first non-main thread, and any other thraeds after that have static
stack sizes (these stack sizes can be varied).

As long as data from one thread is not asyncronously munching data from
another thread, you should be fine.

The prefered standard for RPC calls using threads is a standard know as DCE
(Distributed computing Environment).  According to the FAQ, DCE is available
for Solaris as an implementation by Transac (also re-sold by Sun).  This may
be woth looking into depending on the amount of code already written in your
application.

The DCE FAQ is available at:
  ftp.dstc.edu.au in /pub/DCE/FAQ and
  http://www.osf.org/dce/faq-mauney.html

Till Next Time....
                  Craig.

--
------------------------------------------------------------------------------
Success is the willingness to bear pain.

Shall we see how much success you can cope with?

Send all reply mail to - rmaco@gauss.ma.rmit.edu.au
------------------------------------------------------------------------------