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=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,6f1d6da490488dc7 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-12-20 01:26:53 PST From: "Ratson Janiv" Newsgroups: comp.lang.ada References: <3fe0d45e$1@news.barak.net.il> Subject: Re: A common array Date: Sat, 20 Dec 2003 11:24:31 +0200 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1158 X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 NNTP-Posting-Host: 82-166-190-53.barak.net.il X-Original-NNTP-Posting-Host: 82-166-190-53.barak.net.il Message-ID: <3fe415d7$1@news.barak.net.il> X-Trace: news.barak.net.il 1071912407 82-166-190-53.barak.net.il (20 Dec 2003 11:26:47 +0300) X-Original-Trace: 20 Dec 2003 11:26:47 +0300, 82-166-190-53.barak.net.il Path: archiver1.google.com!news2.google.com!newsfeed2.dallas1.level3.net!news.level3.com!news-out.visi.com!petbe.visi.com!nntp.abs.net!ash.uu.net!news.splitrock.net!nntp02.mcleodusa.net!dimaggio.newszilla.com!sinatra.newszilla.com!news.barak.net.il!not-for-mail Xref: archiver1.google.com comp.lang.ada:3616 Date: 2003-12-20T11:24:31+02:00 List-Id: Thanks I understand that, in my case a cell in the arrray will be updated only once. The other unsolved problem is that I dont know how to reallocate a number to a task. If I check numbers between 1..100, and I only have 8 tasks, The manager task willhave to reuse teh tasks to keep checking the other numbers. hence, a manager should reallocate a new number to a task that has finished checking the previous number. I though about a notification mechanism, hence, each check task will notify the manager task that it finished checking, and the manager task will reallocate a new number to that task. My problem is that I do not know how the Manager Task will know which task has notified it. Any ideas how to solve this problem ? M I in the right though about notification, or there is a better way ? 10x, Janiv. "Ratson Janiv" wrote in message news:3fe0d45e$1@news.barak.net.il... > Hi, > I need to write a program that creates a random number of tasks. > I need the tasks to update a common array (1 array for all the tasks). > do I need keep the array updating in critical section (I know that each task > will update a differnet cell in the array), if so how ? > Also I need to write a mechanism that enables the task to perform the check > twice with two differnet parameters, e.g. I call Task X to check Numer 4 in > the array, and after it finishes, I want it to notify me, and also I want > teh task X to check the 18 Number. > > for the decency, I M studying Ada, and it is part of my work, so please try > to help me as much as U can without writing the answers to me, I think some > guide lines will be helpful. > > Many Many thanks, > Janiv Ratson. > >