comp.lang.ada
 help / color / mirror / Atom feed
From: Niklas Holsti <niklas.holsti@tidorum.invalid>
Subject: Re: Ichbiah 2022 compiler mode
Date: Thu, 12 Sep 2024 10:42:38 +0300	[thread overview]
Message-ID: <lkfkbeF1tp7U1@mid.individual.net> (raw)
In-Reply-To: <vbtrmo$34n9$1@dont-email.me>

On 2024-09-12 7:46, Randy Brukardt wrote:
> "Niklas Holsti" <niklas.holsti@tidorum.invalid> wrote in message
> news:lk3fsvF7aaaU1@mid.individual.net...
> ...
>> I disagree with Randy's view that tasks and "parallel" are much
>> overlapping. Tasks are able to communicate with each other, but AIUI
>> parallel tasklets are not meant to do that, and may not be able to do
>> that. Tasks can have different priorities; tasklets cannot.
> 
> I was (of course) presuming that "tasklets" would get those capabilities if
> they were to replace tasks. That's what I meant about "suspension", which is
> not currently allowed for threads in Ada (parallel code is not allowed to
> call potentially blocking operations). If that was changed, then all forms
> of existing task communication would be allowed.


Ok, I understand. In that case, what "parallel" adds to the current 
tasking feature is an easy way to create a largish and perhaps 
dynamically defined number of concurrent threads from a "parallel" loop, 
where the threads are automatically created when the loop is started and 
automatically "joined" and destroyed when the loop completes.

I don't mind at all if a future Ada evolution merges tasks and 
"parallel", although it might defeat the easier access to multi-core 
true parallelism that is the goal of the "parallel" extension, AIUI.


> I'm less certain about the value of priorities, most of the time, they don't
> help writing correct Ada code. (You still need all of the protections
> against race conditions and the like.) I do realize that they are a natural
> way to express constraints on a program. So I admit I don't know in this
> area, in particular if there are things that priorities are truly required
> for.


Priorities (or the equivalent, such as deadlines) are absolutely 
required for real-time systems where there are fewer cores than 
concurrent/parallel activities so that the system has to schedule more 
than one such activity on one core.

If Ada did not have tasks with priorities, most of the Ada applications 
I have worked on in my life would have had to avoid Ada tasking and 
retreat to using some other real-time kernel, with ad-hoc mapping of the 
kernels's threads to Ada procedures.

Despite the transition to multi-core processors, I think that there will 
continue to be systems where scheduling is required, because the number 
of concurrent/parallel activities will increase too.

  reply	other threads:[~2024-09-12  7:42 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-05 11:52 Ichbiah 2022 compiler mode Kevin Chadwick
2024-09-05 13:40 ` Jeffrey R.Carter
2024-09-05 13:49   ` Bill Findlay
2024-09-05 19:22     ` Jeffrey R.Carter
2024-09-05 14:05   ` Kevin Chadwick
2024-09-05 16:08   ` Kevin Chadwick
2024-09-05 19:24     ` Jeffrey R.Carter
2024-09-06  0:03 ` Randy Brukardt
2024-09-06  0:58   ` Lawrence D'Oliveiro
2024-09-12  4:39     ` Randy Brukardt
2024-09-12 22:24       ` Lawrence D'Oliveiro
2024-09-14  6:18         ` Randy Brukardt
2024-09-14  7:18           ` Lawrence D'Oliveiro
2024-09-06 21:22   ` Simon Wright
2024-09-07 17:13     ` Niklas Holsti
2024-09-07 20:34       ` Nioclás Pól Caileán de Ghloucester
2024-09-12  4:46       ` Randy Brukardt
2024-09-12  7:42         ` Niklas Holsti [this message]
2024-09-12  9:07           ` Dmitry A. Kazakov
2024-09-12 12:36           ` Kevin Chadwick
2024-09-12 15:43             ` Niklas Holsti
2024-09-13 20:45             ` Nioclás Pól Caileán de Ghloucester
2024-09-12  9:04         ` J-P. Rosen
2024-09-12 11:35           ` Niklas Holsti
2024-09-14  6:13             ` Randy Brukardt
2024-09-14  6:47               ` Dmitry A. Kazakov
2024-09-14  7:19               ` Lawrence D'Oliveiro
2024-09-14  8:12               ` Niklas Holsti
2024-09-06 11:07 ` Jeffrey R.Carter
2024-09-06 20:26   ` Nioclás Pól Caileán de Ghloucester
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox