🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: comp.os.os2.programmer
2 messages
2 total messages Started by David R. Giller Mon, 06 Apr 1992 07:42
Performance topics
#627
Author: David R. Giller
Date: Mon, 06 Apr 1992 07:42
28 lines
1538 bytes
Hi all.

I have some questions regarding the performance of various inter-thread
synchronization and semaphore techniques in OS/2 2.0.  (1.3 data is still
probably current).

In particular:

How much time does it take for the system to process DosEnterCriticalSection()
(or whatever the name of the call is -- I don't have the docs handy)?  I
am writing an application that will have several layers, much like a network
protocol stack.  Each one is going to be a thread that works much like a 
filter, managing the packets that are fed through the layers.  How much of a 
hit would I take if I used a critical section whenever I change the structures 
between layers? (assuming each is running in its own thread).  Should I use 
semaphores instead?

Thanks.
-Dave

PS: any insight into the issues related to this would be appreciated.

-Dave
-- 
David Giller, Box 134 | Q: How many Oregonians does it take to screw in a light
Occidental College    | bulb?  A: Three.  One to replace the bulb, and two to
1600 Campus Road      | fend off all the Californians trying to share the
Los Angeles, CA 90041 | experience. ---------------------------rafetmad@oxy.edu
Re: Performance topics
#635
Author: Robert Cain
Date: Wed, 08 Apr 1992 04:27
14 lines
1034 bytes
David, in general any serially reused resource should, given a design choice,
use object locks that threads can block on for serialization of modifications
rather than critical sections.  Critical sections can have very bizzare
effects on performance.  Usually when porting code, one is left with little
choice but critical sections because locks must be a careful part of a design
whereas it is pretty easy to just say "leave me alone" instead. (ask tnt)

Bob

-- 
Bob Cain    rcain@netcom.com   408-358-2007

"There are some strings.  They're just not attached."
                                                    Victoria Roberts
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads