home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / sys / hp / 8713 < prev    next >
Encoding:
Internet Message Format  |  1992-07-29  |  1.7 KB

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