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-Thread: 103376,adb9b9207aecb4b3 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news1.google.com!news.glorb.com!newsfeed.pionier.net.pl!news.nask.pl!newsfeed.tpinternet.pl!atlantis.news.tpi.pl!news.tpi.pl!not-for-mail From: Wojtek Narczynski Newsgroups: comp.lang.ada Subject: Re: epoll Ada binding Date: Wed, 20 Oct 2004 00:11:17 +0200 Organization: tp.internet - http://www.tpi.pl/ Message-ID: References: <311c6b78.0410181100.76f4e8ab@posting.google.com> <311c6b78.0410182103.110885b7@posting.google.com> <311c6b78.0410190755.7084fc3d@posting.google.com> NNTP-Posting-Host: avl124.neoplus.adsl.tpnet.pl Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: atlantis.news.tpi.pl 1098223907 1061 83.27.45.124 (19 Oct 2004 22:11:47 GMT) X-Complaints-To: usenet@tpi.pl NNTP-Posting-Date: Tue, 19 Oct 2004 22:11:47 +0000 (UTC) User-Agent: Pan/0.14.2 (This is not a psychotic episode. It's a cleansing moment of clarity.) Xref: g2news1.google.com comp.lang.ada:5476 Date: 2004-10-20T00:11:17+02:00 List-Id: Hello, > we aim to provide a solution to the same problem space but our > approaches are dissimilar. My approach is to multiplex a number of > connections on the same task. The number of tasks should be related to > the number of CPUs (cores) on the machine. So for a machine with 4 > dual-core CPUs I would chose 8 x N worker tasks. To cover for tasks > being blocked in file IO one could chose N=5 but one would really have > to test and measure to get N right. In my approach - as many processes, as there are CPUs. One task per socket connection, task goes to sleep on read/write, until it can make progress. Overall your solution will perform better because of potentially lesser memory usage (each task needs at least two pages of stack), but I aim at optimizing programmer productivity while maintaining good performance. It's a bit like SGI State Threads. > Diving into the runtime sounds exciting but is a bit advanced for me. With nobody out there to help - major pain. > If and when I get a binding for 'epoll' ready I will let you know - I > have just started to think about 'epoll' after finding out limitations > in GNAT.Sockets implementation as well as in Linux if I were to use > 'select'. You may want to take a look at PolyOrb code, there are event demultiplexing goodies in there. The upper level design might be reusable. Are your results going to be publically available? I am curious what the complexity of EDSM solution will be. Regards, Wojtek