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=-0.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,8d7b1d8587f412a5,start X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!postnews.google.com!9g2000yqa.googlegroups.com!not-for-mail From: singo Newsgroups: comp.lang.ada Subject: Task Priorities on Ubuntu Linux Date: Wed, 9 Dec 2009 06:34:45 -0800 (PST) Organization: http://groups.google.com Message-ID: NNTP-Posting-Host: 130.237.215.68 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: posting.google.com 1260369285 11515 127.0.0.1 (9 Dec 2009 14:34:45 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Wed, 9 Dec 2009 14:34:45 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: 9g2000yqa.googlegroups.com; posting-host=130.237.215.68; posting-account=YaFpXwoAAABFpcqmE2M-zOfwgB6wr6kC User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.5) Gecko/20091109 Ubuntu/9.10 (karmic) Firefox/3.5.5,gzip(gfe),gzip(gfe) Xref: g2news1.google.com comp.lang.ada:8358 Date: 2009-12-09T06:34:45-08:00 List-Id: Hi, Another question on the real-time annex and its implementation in gnat-4.3 (Ubuntu Linux). When I use different task priorities I get an - at least for me - unexpected behavior... I have defined 10 tasks with different priority. When I run my program, I expect only one task per processor (this means four on my quad-core machine) to run. However, unexpectedly all 10 tasks are run on my machine. Is this because the tasks are mapped on the underlying OS (here Linux), which then instead schedules the tasks of different priority with some kind of time-slicing (round-robin) approach? I would appreciate some clarification in this matter. Best regards Ingo P.S: Here comes my example program: pragma Task_Dispatching_Policy(FIFO_Within_Priorities); pragma Queuing_Policy(Priority_Queuing); with Ada.Text_IO; use Ada.Text_IO; with Ada.Real_Time; use Ada.Real_Time; procedure TaskPriorities is task type T(Id: Integer) is pragma Priority(Id); end; task body T is begin loop Put(Integer'Image(Id)); end loop; end T; Task10 : T(11); Task9 : T(12); Task8 : T(13); Task7 : T(14); Task6 : T(15); Task5 : T(16); Task4 : T(17); Task3 : T(18); Task2 : T(19); Task1 : T(20); begin null; end TaskPriorities;