home *** CD-ROM | disk | FTP | other *** search
- Xref: sparky comp.sys.hp:8713 comp.unix.programmer:4008
- Newsgroups: comp.sys.hp,comp.sys.unix.wizards,comp.unix.programmer
- Path: sparky!uunet!wupost!sdd.hp.com!usc!sol.ctr.columbia.edu!destroyer!ncar!csn!dora!dschneid
- From: dschneid@auc.trw.com (Dave Schneider)
- Subject: Kernel implementation of semiphores
- Message-ID: <1992Jul30.060116.209@auc.trw.com>
- Reply-To: dschneid@dora.UUCP (Dave Schneider)
- Organization: TRW Denver Operations
- Date: Thu, 30 Jul 1992 06:01:16 GMT
- Lines: 25
-
- I have a question for those of you out there that may know something about
- how some of the IPC functions are implemented in the kernel. I have an
- application that consists of a fair number of processes (~20) that coordinate
- with each other through the use of semiphores. While the system is operating
- there is a rather large number of semiphores defined in the system (50-60).
-
- The application runs on an HP 9000/433s under hp-ux 8.0.
-
- I have noticed that the performance cost of performing a semiphore operation
- is quite dependent on the number of semiphores in the system. As the number
- increases so does the cost. I would like to know how the kernel maps the
- semiphore ID to the data structure in the kernel that represents the semiphore.
- Since the range of values used for semiphore IDs varies over a large range
- (0 to ~4000) it seem unlikely that it is an index into a table. If so the
- table would have to be rather large with few entries used.
-
- Is a linked list of structures used which is searched for a matching ID
- when an operation is performed on the semiphore? If so this search time would
- explain the relation between execution time and the number of semiphores.
-
- An insight that anyone may have would help. If you have information please
- respond via e-mail.
-
- Thanks
- Dave Schneider
-