Usenet comp.unix.osf.misc (1992-2004)
 help / color / mirror / Atom feed
From: Jeffrey L. DeMent <jld@advtech.uswest.com>
Subject: semop() and threads -- a bad mix ?
Date: Fri, 18 Jun 1993 18:28:55 GMT	[thread overview]
Message-ID: <C8ty07.AM5@da_vinci.it.uswc.uswest.com> (raw)

To:  DCE Community

I have a serious DCE issue and any insights or help would be appreciated.

FYI:  we have the Transarc DCE implementation running on Sun hardware.

Our company has developed a collection of reusable UNIX-based software
assets (a few years ago before DCE), and if an application wishes to use
the complete suite of software components, it must architect it's program
a certain way.  I am not a (deep) system internals person so bear with me.

Most of the software assets assume you are using their "event loop mechanism" 
which uses semop() to create an environment for the program where there is only
one blocking -- namely this semop() command (exactly like an X event loop -- in
fact, if you use X and this software, it assumes the responsibilities of the X
event loop).  The program continuely loops, waiting for any pre-defined event,
(such as a SIGALRM signal from a timer function -- one of the assets they
wrote). When the event is received, a chuck of code is executed to deal with
the event and the program goes back to waiting (at the semop system call).
In our environment this seems to effectively prohibit the use of threads
because even if you create a thread to deal with the event and immediately
go back to the loop,  the semop() call blocks the process and consequently
the thread you just created.  In other words, as I understand it, this
program architecture as implemented using semop() makes parallelism impossible
and hence defeats a fundamental advantage of DCE.

AND IF all this is in fact true, does it not mean you cannot mix X-windows
and threads in the same binary ?

From these facts, does anyone have any insights, solutions or validation of
my assessment of the situation ?  I would be glad to provide additional details,
this is very important to our company.  Thanks.

Jeff
_____________________________________________________________________

 Jeffrey L. DeMent                                  _._._._._._._
 U S WEST Advanced Technologies                    (_|_|_|_|_|_|_)
 1475 Lawrence Street, Suite 400                    ` \` | | '/ '
 Denver, Colorado  80202                             ` \`| |'/ '
                                                      ` \| |/ '
 Phone: (303) 595-0519                                 ` \0/ '
 FAX:   (303) 592-6532                                  `~#~'
                                                          ^
 Internet: jld@advtech.uswest.com
_____________________________________________________________________


             reply	other threads:[~1993-06-18 18:28 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1993-06-18 18:28 Jeffrey L. DeMent [this message]
1993-06-18 23:07 ` semop() and threads -- a bad mix ? John Stafford
1993-06-21 18:48 ` Greg Brail
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