comp.lang.ada
 help / color / mirror / Atom feed
* User threads in Ada ?
@ 2016-05-28 21:08 Hadrien Grasland
  2016-05-28 22:11 ` joakimds
  0 siblings, 1 reply; 3+ messages in thread
From: Hadrien Grasland @ 2016-05-28 21:08 UTC (permalink / raw)


Hi everyone,

Recently, cooperatively scheduled user threads have become popular again in the parallel programming community. The main goal behind their use is typically to avoid spawning, blocking and liberating kernel threads all the time, which comes with some significant overhead.

Some C++ libraries such as Intel TBB and HPX now make it much easier and portable than before to deal with such user threads, in no small part thanks to a couple of nice abstractions, such as asynchronous function calls returning futures that provide event-like synchronization.

I'm currently playing around with this concept in Ada, and wondering how far it can be taken. The first thing to do being, of course, to tell what is already there. Is anyone aware of previous work related to implementing user threads in Ada ?

Cheers,
Hadrien

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: User threads in Ada ?
  2016-05-28 21:08 User threads in Ada ? Hadrien Grasland
@ 2016-05-28 22:11 ` joakimds
  2016-06-05 18:03   ` Hadrien Grasland
  0 siblings, 1 reply; 3+ messages in thread
From: joakimds @ 2016-05-28 22:11 UTC (permalink / raw)


Den lördag 28 maj 2016 kl. 23:08:03 UTC+2 skrev Hadrien Grasland:
> Hi everyone,
> 
> Recently, cooperatively scheduled user threads have become popular again in the parallel programming community. The main goal behind their use is typically to avoid spawning, blocking and liberating kernel threads all the time, which comes with some significant overhead.
> 
> Some C++ libraries such as Intel TBB and HPX now make it much easier and portable than before to deal with such user threads, in no small part thanks to a couple of nice abstractions, such as asynchronous function calls returning futures that provide event-like synchronization.
> 
> I'm currently playing around with this concept in Ada, and wondering how far it can be taken. The first thing to do being, of course, to tell what is already there. Is anyone aware of previous work related to implementing user threads in Ada ?
> 
> Cheers,
> Hadrien

Dear Hadrien,

What comes to my mind is the Generic_Tasking package I wrote to create a pool of worker tasks and to distribute the work-load on them:
https://github.com/joakim-strandberg/determine_prime_numbers_on_many_core_systems

I have not looked at TBB nor HPX but can imagine their API is nicer and more thought through.

Brad Moore has shared code also. Google for "Paraffin".

Best regards,
Joakim

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: User threads in Ada ?
  2016-05-28 22:11 ` joakimds
@ 2016-06-05 18:03   ` Hadrien Grasland
  0 siblings, 0 replies; 3+ messages in thread
From: Hadrien Grasland @ 2016-06-05 18:03 UTC (permalink / raw)


Le dimanche 29 mai 2016 00:11:20 UTC+2, joak...@kth.se a écrit :
> Den lördag 28 maj 2016 kl. 23:08:03 UTC+2 skrev Hadrien Grasland:
> > Hi everyone,
> > 
> > Recently, cooperatively scheduled user threads have become popular again in the parallel programming community. The main goal behind their use is typically to avoid spawning, blocking and liberating kernel threads all the time, which comes with some significant overhead.
> > 
> > Some C++ libraries such as Intel TBB and HPX now make it much easier and portable than before to deal with such user threads, in no small part thanks to a couple of nice abstractions, such as asynchronous function calls returning futures that provide event-like synchronization.
> > 
> > I'm currently playing around with this concept in Ada, and wondering how far it can be taken. The first thing to do being, of course, to tell what is already there. Is anyone aware of previous work related to implementing user threads in Ada ?
> > 
> > Cheers,
> > Hadrien
> 
> Dear Hadrien,
> 
> What comes to my mind is the Generic_Tasking package I wrote to create a pool of worker tasks and to distribute the work-load on them:
> https://github.com/joakim-strandberg/determine_prime_numbers_on_many_core_systems
> 
> I have not looked at TBB nor HPX but can imagine their API is nicer and more thought through.
> 
> Brad Moore has shared code also. Google for "Paraffin".
> 
> Best regards,
> Joakim

Thanks for these answers! After taking a look, I don't think either of those quite matches what I have in mind as far as the core tasking model is concerned, so in the end I started rolling my own project, which I will announce here once it reaches a good enough shape.

However, the higher-level data-parallel API of paraffin is pretty nice and I will most likely take inspiration from it when I get to the point of trying to implement data-parallel primitives on top of my task-parallel API.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-06-05 18:03 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-28 21:08 User threads in Ada ? Hadrien Grasland
2016-05-28 22:11 ` joakimds
2016-06-05 18:03   ` Hadrien Grasland

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