From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f678f,5887723974c3780c,start X-Google-Attributes: gidf678f,public X-Google-ArrivalTime: 1993-06-18 13:51:45 PST Newsgroups: comp.unix.osf.misc Path: gmd.de!xlink.net!sol.ctr.columbia.edu!news.kei.com!ub!csn!cherokee!da_vinci!jld From: Jeffrey L. DeMent Subject: semop() and threads -- a bad mix ? Message-ID: Originator: jld@dropzone Keywords: semop, parallelism, threads Sender: news@da_vinci.it.uswc.uswest.com (IT Netnews) Nntp-Posting-Host: dropzone Reply-To: Jeffrey L. DeMent Organization: U S WEST Advanced Technologies Distribution: usa Date: Fri, 18 Jun 1993 18:28:55 GMT 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 _____________________________________________________________________