home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / parallel / 1928 < prev    next >
Encoding:
Text File  |  1992-08-17  |  2.0 KB  |  54 lines

  1. Newsgroups: comp.parallel
  2. Path: sparky!uunet!haven.umd.edu!darwin.sura.net!paladin.american.edu!gatech!hubcap!fpst
  3. From: Ian Heavens <ian@spider.co.uk>
  4. Subject: Is the overhead of spin lock acquisition always significant?
  5. Message-ID: <1992Aug18.111938.19628@hubcap.clemson.edu>
  6. Apparently-To: comp-parallel@uunet.uu.net
  7. Sender: USENET News System <news@spider.co.uk>
  8. Nntp-Posting-Host: redknee.spider.co.uk
  9. Organization: Spider Systems Limited, Edinburgh, UK
  10. Date: Tue, 18 Aug 1992 10:47:12 GMT
  11. Approved: parallel@hubcap.clemson.edu
  12. Lines: 40
  13.  
  14. I'd like to question one of the sacred cows of spin-lock based shared 
  15. memory multiprocessing: that the number of spin locks acquired should be 
  16. minimised, because the overhead in lock acquisition is significant.
  17.  
  18. I agree that contention is always significant, and that there are good
  19. other reasons for not having lots of locks (clarity and deadlock
  20. avoidance).  Also, in some applications, the overhead of lock
  21. acquisition may be significant, where the critical sections are
  22. very short and are executed very frequently.
  23.  
  24. In our application, a TCP/IP protocol stack, the difference between
  25. acquiring 5 and 10 locks on a typical input or output path seems to me
  26. to be insignificant compared to the protocol processing, assuming no
  27. contention for those locks.  
  28.  
  29. This issue becomes important because multiple-reader/single-writer
  30. locks are much more convenient to use, and reduce contention, at
  31. a cost of increasing the overhead (three times that of a mutex lock?).
  32.  
  33. Are their cache consistency or other reasons to inflate the overhead
  34. of testing and setting a memory location?  What have I missed?
  35.  
  36. Can someone suggest a rough equivalent for a spin lock acquisition in
  37. terms of (some arbitrary mix of) instructions execution, where both 
  38. instruction and data fetch are cache hits?
  39.  
  40. thanks
  41.  
  42.  
  43. ian
  44.  
  45. ---
  46. Ian Heavens                ian@spider.co.uk                 
  47. Spider Software
  48. Spider Park, Stanwell Street        
  49. Edinburgh, EH6 5NG, Scotland        +44 31 555 5166 (Ext 4347)
  50. --
  51.  
  52.  
  53.  
  54.