From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,fb45e48e8dddeabd X-Google-Attributes: gid103376,public X-Google-Thread: ffc1e,fb45e48e8dddeabd X-Google-Attributes: gidffc1e,public From: Ehud Lamm Subject: Re: Ada Protected Object Tutorial #1 Date: 1999/12/26 Message-ID: #1/1 X-Deja-AN: 564991197 References: <839toq$pu$1@bgtnsc03.worldnet.att.net> <385AC716.7E65BD5C@averstar.com> Content-Type: TEXT/PLAIN; charset=US-ASCII X-Complaints-To: usenet@news.huji.ac.il X-Trace: news.huji.ac.il 946210485 2577 132.64.178.45 (26 Dec 1999 12:14:45 GMT) Organization: The Hebrew University of Jerusalem Mime-Version: 1.0 NNTP-Posting-Date: 26 Dec 1999 12:14:45 GMT Newsgroups: comp.programming.threads,comp.lang.ada Date: 1999-12-26T12:14:45+00:00 List-Id: |Kaz Kylheku wrote in message ... |>On Fri, 17 Dec 1999 23:28:22 GMT, Tucker Taft wrote: |>>As one data point, a classic producer/consumer example with a |>>bounded buffer, when coded using a protected type versus |>>usingmutex/condition variables, results in typically half as many |>>locks and unlocks, and one third as many context switches |>>between the producer and the consumer. The mutex/condition |>>variable approach involves so much more work because each |>>thread ends up doing all the work "itself," rather than allowing the |>>other threadto do a little bit of work on its behalf while it already |>> holds the lock. |> |>Is there a paper about this which argues the case in more detail? For my suggested reading page: The Rendezvous is Dead -- Long Live the Protected Object This very interesting article tries to explain why it is almost always better to use protected types, and create less tasks. It gives detailed examples of many tasking idiom, so it is also helpful as a guide to Ada tasking. http://www.cs.fsu.edu/~mueller/ftp/pub/mueller/papers/sigada98.ps.gz Ehud Lamm mslamm@mscc.huji.ac.il http://purl.oclc.org/NET/ehudlamm <== My home on the web Check it out and subscribe to the E-List- for interesting essays and more!