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,be8661795c50a037,start X-Google-Attributes: gid103376,public X-Google-Thread: 115aec,be8661795c50a037,start X-Google-Attributes: gid115aec,public From: Matthew Heaney Subject: ANNOUNCE: dining philosophers article posted to ACM archives Date: 1999/04/12 Message-ID: #1/1 X-Deja-AN: 465390576 NNTP-Posting-Date: Mon, 12 Apr 1999 01:05:05 PDT Newsgroups: comp.lang.ada,comp.realtime Date: 1999-04-12T00:00:00+00:00 List-Id: I have posted the article "Dining Philosophers" to the April 1999 ACM patterns archive. Instructions for subscribing to the ACM patterns list appear at the end of this message. Here is an excerpt from the article: Dining Philosophers In this article we solve the dining philosophers problem, a classic example used to illustrate resource allocation issues. It features a few different patterns implemented using myriad Ada features, including counting semaphores, monitors, tasks, singletons, observers, and procedure pointers. There are five philosophers who do nothing but eat and think. When a philosopher wants to eat, she sits at a table with five places. Between each place is a chopstick that each philosopher shares with her neighbor. A chopstick can only be used by one philosopher at a time. Before she can eat, a philosopher must pick up both her left and right chopsticks. If her neighbor has already picked up a chopstick, she must wait for her neighbor to put it down, and then try to pick it up again. We want to monitor the progress of philosophers, so each philosopher reports state-changes to an observer, who displays the new state. The code provided is loosely based on the example in Chapter 6 of Concurrency In Ada, by Alan Burns and Andy Wellings, and on the example that comes with the GNAT sources, written by Michael B. Feldman. About the ACM Patterns Mailing List I have translated every C++ example in the GoF Design Patterns book to Ada95, and have now started documenting idioms for concurrency, real-time programming, and interprocess communication. You can subscribe to the ACM patterns list by sending the message (body) subscribe patterns to the ACM mailing list server. Matt