home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / os / research / 885 < prev    next >
Encoding:
Internet Message Format  |  1992-08-30  |  2.1 KB

  1. Path: sparky!uunet!olivea!hal.com!darkstar.UCSC.EDU!osr
  2. From: fouts@bozeman.hpl.hp.com (Martin Fouts)
  3. Newsgroups: comp.os.research
  4. Subject: Re: Lightweight threads and "real" users
  5. Message-ID: <17tq4mINNfdl@darkstar.UCSC.EDU>
  6. Date: 31 Aug 92 18:58:30 GMT
  7. References: <13cn3eINN8cn@darkstar.UCSC.EDU> <13sb8pINNn28@darkstar.UCSC.EDU> <17n06qINN793@darkstar.UCSC.EDU>
  8. Organization: Hewlett-Packard Labs
  9. Lines: 42
  10. Approved: comp-os-research@ftp.cse.ucsc.edu
  11. NNTP-Posting-Host: ftp.cse.ucsc.edu
  12. Originator: osr@ftp
  13.  
  14. In article <17n06qINN793@darkstar.UCSC.EDU>, Jack_Palevich@taligent.com (Jack Palevich) writes:
  15. |> [...]
  16. |> 
  17. |> Several years ago, when I started to program concurrently, a wise veteran
  18. |> gave me this advice:
  19. |> 
  20. |> 1) Within an address space use monitors & conditions, rather than raw
  21. |> semaphores.
  22. |> 
  23. |> 2) Never call out of your scope with a monitor held.
  24. |> 
  25. |> 3) Between address spaces use synchronous send-and-wait-for-reply
  26. |> messaging, rather than asynch messaging.
  27. |> 
  28. |> [...]
  29. |> 
  30. |> Now, several years later, I have come to believe in these rules
  31. |> whole-heartedly. If you follow them, then you should have no problems using
  32. |> concurrency. If you don't, you'll gain a deeper understanding of the
  33. |> complexity of concurrent programming. :-)
  34.  
  35. If you don't, there will be a class of applications you will be able
  36. to write more efficiently than otherwise.  The above rules are good
  37. rules and should be followed unless you can discover a compelling
  38. reason not to follow them.  The trick here is that the reason must be
  39. compelling. My favorite multi-player video game is a concurrent
  40. program which was written violating rule 3, was easier to implement
  41. because it violated that rule, and, perhaps, easier to understand.
  42. This is because the program only needed to send one kind of message
  43. and that kind was broadcast here-is-my-state message which it could
  44. send and forgot. 
  45.  
  46. Marty
  47.  
  48. -- 
  49. Martin Fouts                  |  M/S 1U-14
  50. Member of Technical Staff     |  HP Laboratories
  51. EMAIL:  fouts@hpl.hp.com      !  MAIL:  P.O. Box 10490
  52. PHONE:  (415) 857-2971        |  SHIP:  1501 Page Mill Road
  53.   FAX:  (415) 857-8526        |  Palo Alto, CA 94304-1126
  54.  
  55. novae erratae!
  56.