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