Usenet comp.unix.osf.osf1 (1992-2004)
 help / color / mirror / Atom feed
From: curts@compgen.com (Curt Smith)
Cc: dyuan@win20.rch.mci.com
Subject: Re: Speed comparison of Posix named and SysV semaphore operations
Date: 1996/04/22	[thread overview]
Message-ID: <4lg1j3$sns@nntp.atlanta.com> (raw)
In-Reply-To: 4ktur4$r5f@news.internetmci.com

David Yuan (dyuan@win20.rch.mci.com) wrote:
: hi,
: 
: I am using an Alphaserver 2100 4/275 which has 1 gb memory,
: 1 21064 CPU. OS is Digital UNIX v3.2c.  I found that P1003.1b
: named semaphore operations (sem_create, sem_wait, sem_post) are 
: faster than System V implementation (semget,semop). The following
: is the result of pure semaphore acquire and release operations 
: (at test time, the system load is very low, actually, only myself 
: was using the machine):
: 
: iterations   Posix      Sys V
: 1000000      3.544193   18.788549  # normal process
: 1000000      3.867264   18.703296  # change priority to max priority

If your multi-task application will have few lock collisions or you 
don't need the counting part of semaphores, then why not use 
spin locks on shared mem between all tasks?

DEC Has a nice wrapper for test and set: _msem_tas(), and when
combined with, memory barrier, mb(), makes for very fast SMP, multi-task
binary lock.

Curt Smith
curts@compgen.com




      reply	other threads:[~1996-04-22  4:00 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-04-15  4:00 Speed comparison of Posix named and SysV semaphore operations David Yuan
1996-04-22  4:00 ` Curt Smith [this message]
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