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.9 required=5.0 tests=BAYES_00 autolearn=unavailable autolearn_force=no version=3.4.4 X-FeedAbuse: http://nntpfeed.proxad.net/abuse.pl feeded by 78.192.65.63 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!mx02.eternal-september.org!feeder.eternal-september.org!newsfeed.fsmpi.rwth-aachen.de!newsfeed.straub-nv.de!proxad.net!feeder1-2.proxad.net!nntpfeed.proxad.net!news.muarf.org!news.ecp.fr!news.jacob-sparre.dk!loke.jacob-sparre.dk!pnx.dk!.POSTED!not-for-mail From: Jacob Sparre Andersen Newsgroups: comp.lang.ada Subject: Re: How to: communication between multiple tasks using protected objects - with no polling? Date: Wed, 21 Jan 2015 19:56:17 +0100 Organization: Jacob Sparre Andersen Research & Innovation Message-ID: <87a91c0xpq.fsf@adaheads.sparre-andersen.dk> References: <32208488-3a04-4d2a-8c64-840502dcf96d@googlegroups.com> NNTP-Posting-Host: 109.59.32.77.mobile.3.dk Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: loke.gir.dk 1421866579 32083 109.59.32.77 (21 Jan 2015 18:56:19 GMT) X-Complaints-To: news@jacob-sparre.dk NNTP-Posting-Date: Wed, 21 Jan 2015 18:56:19 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.4 (gnu/linux) Cancel-Lock: sha1:BqTFToTes8KQb2MdGs7ygmHxOYg= Xref: news.eternal-september.org comp.lang.ada:24674 Date: 2015-01-21T19:56:17+01:00 List-Id: Esa Riihonen wrote: > So - in my mind I have a small number of students each with a separete > blackboard. And instead of my teacher walking around checking whether > the answer of any of the sudents is ready - I wan't to let the teacher > doze in his/her chair and only be woken up when any of the students > have their answer ready. And after the student briefly nudges the > teacher he/she must be free to immediately continue with his/her other > exams. > > I guess I just don't know how this 'blackboard' model should be > implemented? To me it sounds like a single protected object for storing the state of all the workers (students) makes most sense. The workers can push in their most recent state through a (common) protected procedure. The master (teacher) blocks on a protected entry until at least one worker has updated its state. Greetings, Jacob -- "Facts do not cease to exist because they are ignored." -- Aldous Huxley