Topic: Lock free fifo, stack


Author: Tony V E <tvaneerd@gmail.com>
Date: Sun, 11 Nov 2012 06:54:26 -0000
Raw View
--20cf3074b692ed438804ce32a7ca
Content-Type: text/plain; charset=windows-1252
Content-Transfer-Encoding: quoted-printable

There are also lockfree structures currently making their way into boost.

Sent from my BlackBerry=AE PlayBook=99
www.blackberry.com

------------------------------
*From:* "adrien courdavault" <adrien59cadri@gmail.com>
*To:* "std-proposals@isocpp.org" <std-proposals@isocpp.org>
*Sent:* 5 November, 2012 5:20 PM
*Subject:* [std-proposals] Re: Lock free fifo, stack

Yes there is a non free commercial version indead.

Le lundi 5 novembre 2012 22:48:21 UTC+1, DeadMG a =E9crit :
>
> I believe one of the study groups is a concurrency working group, which i=
s
> looking at this. TBB is commercial, as well as GPL, I think.
>
> On Monday, November 5, 2012 9:38:38 PM UTC, adrien courdavault wrote:
>>
>> Thank you for the information.
>> When you say the standard is looking at it, do you mean it is already
>> studied by one of the groups ?
>>
>> I did not know about the PPL.
>> However I remember having a look at Intel's TBB but I think this is GPL.
>>
>> Best
>>
>> Le lundi 5 novembre 2012 22:19:27 UTC+1, DeadMG a =E9crit :
>>>
>>> The Standard is certainly looking at adding it. But you can find
>>> high-quality implementations in TBB and PPL.
>>>
>>> On Monday, November 5, 2012 8:38:37 PM UTC, adrien courdavault wrote:
>>>>
>>>> *Hi everyone,
>>>>
>>>> I work in the domain of real-time audio processing. A problem that is
>>>> really common is to have a high priority thread (the audio device call=
back)
>>>> needing to send, receive messages or exchange data in general with oth=
er
>>>> thread (like the main application thread running the GUI).
>>>>
>>>> To do this I use Lock free FIFOs most of the time. The code I have for
>>>> this is based on the publications of Herb Sutter among others. Here is=
 a
>>>> list of interesting articles about this issue :
>>>> http://globalengineer.wordpress.com/2008/10/31/lock-free-queue-article=
s-on-dr-dobbs-journal/
>>>>
>>>> I=92m really happy to see the new <atomic> feature, it is so nice beca=
use
>>>> I will not have to write CompareAndSwapInt macros anymore to have port=
able
>>>> code between MacOS, and Windows (and soon perhaps Android, iOS =85), t=
hat
>>>> will clearly make my code simpler. Also I see that there is a group wo=
rking
>>>> hard on the transactional memory problem. And this is also important
>>>> because I=92m not really good with the memory barriers issues but I ha=
d to
>>>> code something using non-portable API to do create a multi writer mult=
i
>>>> reader FIFO that is really thread safe on multi core architectures and=
 I
>>>> hope that the SG5 will make my life easier and this implementation saf=
er
>>>> with more clean code.
>>>>
>>>> So I just wonder, why not adding lock free FIFO to the standard ? (As =
I
>>>> think I might not be the only one with this issue). And obviously this=
 idea
>>>> can be extended to more containers even if I don=92t think it would be=
 useful
>>>> for any container.
>>>>
>>>> In my search for existing libraries that are LGPL or other open
>>>> licenses, I found this http://www.liblfds.org/, where there is such a
>>>> library without any license.
>>>>
>>>> Would you think this would be useful to have this ?
>>>>
>>>> Note :
>>>> I don=92t know if this is already included in any other proposal, I di=
d
>>>> not find this in the forum of future proposals and I don=92t think thi=
s is
>>>> already a part of the standard nor the SG5 papers.
>>>> I=92m really sorry if I was wrong, if this already exist, could you
>>>> please tell me.*
>>>>
>>>  --

--=20




--20cf3074b692ed438804ce32a7ca
Content-Type: text/html; charset=windows-1252
Content-Transfer-Encoding: quoted-printable

<html><head></head><body>There are also lockfree structures currently makin=
g their way into boost.<br><br><div id=3D"1330154144936-sig-id">Sent from m=
y BlackBerry=AE PlayBook=99<br><a href=3D"http://www.blackberry.com">www.bl=
ackberry.com</a></div>
<br><hr><div><strong>From:</strong> &quot;adrien courdavault&quot; &lt;<a h=
ref=3D"mailto:adrien59cadri@gmail.com">adrien59cadri@gmail.com</a>&gt;<br><=
strong>To:</strong> &quot;<a href=3D"mailto:std-proposals@isocpp.org">std-p=
roposals@isocpp.org</a>&quot; &lt;<a href=3D"mailto:std-proposals@isocpp.or=
g">std-proposals@isocpp.org</a>&gt;<br>
<strong>Sent:</strong> 5 November, 2012 5:20 PM<br><strong>Subject:</strong=
> [std-proposals] Re: Lock free fifo, stack<br></div><br>Yes there is a non=
 free commercial version indead.<div><br></div><div>Le lundi 5 novembre 201=
2 22:48:21 UTC+1, DeadMG a =E9crit=A0:<blockquote class=3D"gmail_quote" sty=
le=3D"margin:0;margin-left:0.8ex;border-left:1px #ccc solid;padding-left:1e=
x">
I believe one of the study groups is a concurrency working group, which is =
looking at this. TBB is commercial, as well as GPL, I think.<br><br>On Mond=
ay, November 5, 2012 9:38:38 PM UTC, adrien courdavault wrote:<blockquote c=
lass=3D"gmail_quote" style=3D"margin:0;margin-left:0.8ex;border-left:1px #c=
cc solid;padding-left:1ex">
Thank you for the information.<div>When you say the standard is looking at =
it, do you mean it is already studied by one of the groups ?</div><div><br>=
</div><div>I did not know about the PPL.</div><div>However I remember havin=
g a look at Intel&#39;s TBB but I think this is GPL.</div>
<div><br></div><div>Best<br><br>Le lundi 5 novembre 2012 22:19:27 UTC+1, De=
adMG a =E9crit=A0:<blockquote class=3D"gmail_quote" style=3D"margin:0;margi=
n-left:0.8ex;border-left:1px #ccc solid;padding-left:1ex">The Standard is c=
ertainly looking at adding it. But you can find high-quality implementation=
s in TBB and PPL.<br>
<br>On Monday, November 5, 2012 8:38:37 PM UTC, adrien courdavault wrote:<b=
lockquote class=3D"gmail_quote" style=3D"margin:0;margin-left:0.8ex;border-=
left:1px #ccc solid;padding-left:1ex"><b style=3D"color:rgb(0,0,0);font-fam=
ily:&#39;Times New Roman&#39;;font-size:medium;font-weight:normal"><span st=
yle=3D"font-size:15px;font-family:Arial;background-color:transparent;white-=
space:pre-wrap">Hi everyone,</span><br>
<span style=3D"font-size:15px;font-family:Arial;background-color:transparen=
t;white-space:pre-wrap"></span><br><span style=3D"font-size:15px;font-famil=
y:Arial;background-color:transparent;white-space:pre-wrap">I work in the do=
main of real-time audio processing. A problem that is really common is to h=
ave a high priority thread (the audio device callback) needing to send, rec=
eive messages or exchange data in general with other thread (like the main =
application thread running the GUI).</span><br>
<span style=3D"font-size:15px;font-family:Arial;background-color:transparen=
t;white-space:pre-wrap"></span><br><span style=3D"font-size:15px;font-famil=
y:Arial;background-color:transparent;white-space:pre-wrap">To do this I use=
 </span><span style=3D"font-size:15px;font-family:Arial;background-color:tr=
ansparent;font-weight:bold;white-space:pre-wrap">Lock free FIFOs</span><spa=
n style=3D"font-size:15px;font-family:Arial;background-color:transparent;wh=
ite-space:pre-wrap"> most of the time. The code I have for this is based on=
 the publications of Herb Sutter among others. Here is a list of interestin=
g articles about this issue : </span><a href=3D"http://globalengineer.wordp=
ress.com/2008/10/31/lock-free-queue-articles-on-dr-dobbs-journal/" target=
=3D"_blank"><span style=3D"font-size:15px;font-family:Arial;background-colo=
r:transparent;text-decoration:underline;white-space:pre-wrap">http://global=
engineer.wordpress.com/2008/10/31/lock-free-queue-articles-on-dr-dobbs-jour=
nal/</span></a><span style=3D"font-size:15px;font-family:Arial;background-c=
olor:transparent;white-space:pre-wrap"></span><br>
<span style=3D"font-size:15px;font-family:Arial;background-color:transparen=
t;white-space:pre-wrap"></span><br><span style=3D"font-size:15px;font-famil=
y:Arial;background-color:transparent;white-space:pre-wrap">I=92m really hap=
py to see the new &lt;atomic&gt; feature, it is so nice because I will not =
have to write CompareAndSwapInt macros anymore to have portable code betwee=
n MacOS, and Windows (and soon perhaps Android, iOS =85), that will clearly=
 make my code simpler. Also I see that there is a group working hard on the=
 transactional memory problem. And this is also important because I=92m not=
 really good with the memory barriers issues but I had to code something us=
ing non-portable API to do create a multi writer multi reader FIFO that is =
really thread safe on multi core architectures and I hope that the SG5 will=
 make my life easier and this implementation safer with more clean code.</s=
pan><br>
<span style=3D"font-size:15px;font-family:Arial;background-color:transparen=
t;white-space:pre-wrap"></span><br><span style=3D"font-size:15px;font-famil=
y:Arial;background-color:transparent;white-space:pre-wrap">So I just wonder=
, why not adding lock free FIFO to the standard ? (As I think I might not b=
e the only one with this issue). And obviously this idea can be extended to=
 more containers even if I don=92t think it would be useful for any contain=
er.</span><br>
<span style=3D"font-size:15px;font-family:Arial;background-color:transparen=
t;white-space:pre-wrap"></span><br><span style=3D"font-size:15px;font-famil=
y:Arial;background-color:transparent;white-space:pre-wrap">In my search for=
 existing libraries that are LGPL or other open licenses, I found this </sp=
an><a href=3D"http://www.liblfds.org/" target=3D"_blank"><span style=3D"fon=
t-size:15px;font-family:Arial;background-color:transparent;text-decoration:=
underline;white-space:pre-wrap">http://www.liblfds.org/</span></a><span sty=
le=3D"font-size:15px;font-family:Arial;background-color:transparent;white-s=
pace:pre-wrap">, where there is such a library without any license.</span><=
br>
<span style=3D"font-size:15px;font-family:Arial;background-color:transparen=
t;white-space:pre-wrap"></span><br><span style=3D"font-size:15px;font-famil=
y:Arial;background-color:transparent;white-space:pre-wrap">Would you think =
this would be useful to have this ?</span><br>
<span style=3D"font-size:15px;font-family:Arial;background-color:transparen=
t;white-space:pre-wrap"></span><br><span style=3D"font-size:15px;font-famil=
y:Arial;background-color:transparent;white-space:pre-wrap">Note :</span><br=
>
<span style=3D"font-size:15px;font-family:Arial;background-color:transparen=
t;white-space:pre-wrap">I don=92t know if this is already included in any o=
ther proposal, I did not find this in the forum of future proposals and I d=
on=92t think this is already a part of the standard nor the SG5 papers.</sp=
an><br>
<span style=3D"font-size:15px;font-family:Arial;background-color:transparen=
t;white-space:pre-wrap">I=92m really sorry if I was wrong, if this already =
exist, could you please tell me.</span></b><br></blockquote></blockquote></=
div>
</blockquote></blockquote></div>

<p></p>

-- <br>
=A0<br>
=A0<br>
=A0<br>
</body></html>

<p></p>

-- <br />
&nbsp;<br />
&nbsp;<br />
&nbsp;<br />

--20cf3074b692ed438804ce32a7ca--

.


Author: adrien courdavault <adrien59cadri@gmail.com>
Date: Wed, 14 Nov 2012 13:30:40 -0800 (PST)
Raw View
------=_Part_1062_21371949.1352928640130
Content-Type: text/plain; charset=windows-1252
Content-Transfer-Encoding: quoted-printable

Hi

I did not know about this could you tell me which lib would implement that=
=20
in the future ?

Another thing I would like to mention is the need to have a standard=20
solution(s) for dynamic allocation without lock or lock free pools of=20
memory which would also be  thread safe obviously.
I Checked out the tlsf allocator idea, and the http://locklessinc.com/ lib.=
=20
I don't know if this is thread safe.

Anyway I think that the* multimedia applications and critical performance=
=20
applications are often using C++ and need wait free and thread safe=20
solutions for containers AND allocation of the objects inside the container=
s
*. This is also important for game programming, and that is one of the=20
thing *that makes C++ so much more interesting than other languages but=20
coding that kind of stuff is hard, error prone.
*
Thank you for any informations you would have about this getting to be=20
standardized

PS, I checked the transactional memory stuff it is not really clear to me=
=20
yet but it looks like this may have applications in such things as lock=20
free, thread safe code but what I need is more the high level stuff=20
(containers and allocation) even if the implementation is not yet based on=
=20
transactional memory.

Best

Le dimanche 11 novembre 2012 07:54:28 UTC+1, Tony V E a =E9crit :
>
> There are also lockfree structures currently making their way into boost.
>
> Sent from my BlackBerry=AE PlayBook=99
> www.blackberry.com
>
> ------------------------------
> *From:* "adrien courdavault" <adrien...@gmail.com <javascript:>>
> *To:* "std-pr...@isocpp.org <javascript:>" <std-pr...@isocpp.org<javascri=
pt:>
> >
> *Sent:* 5 November, 2012 5:20 PM
> *Subject:* [std-proposals] Re: Lock free fifo, stack
>
> Yes there is a non free commercial version indead.
>
> Le lundi 5 novembre 2012 22:48:21 UTC+1, DeadMG a =E9crit :
>>
>> I believe one of the study groups is a concurrency working group, which=
=20
>> is looking at this. TBB is commercial, as well as GPL, I think.
>>
>> On Monday, November 5, 2012 9:38:38 PM UTC, adrien courdavault wrote:
>>>
>>> Thank you for the information.
>>> When you say the standard is looking at it, do you mean it is already=
=20
>>> studied by one of the groups ?
>>>
>>> I did not know about the PPL.
>>> However I remember having a look at Intel's TBB but I think this is GPL=
..
>>>
>>> Best
>>>
>>> Le lundi 5 novembre 2012 22:19:27 UTC+1, DeadMG a =E9crit :
>>>>
>>>> The Standard is certainly looking at adding it. But you can find=20
>>>> high-quality implementations in TBB and PPL.
>>>>
>>>> On Monday, November 5, 2012 8:38:37 PM UTC, adrien courdavault wrote:
>>>>>
>>>>> *Hi everyone,
>>>>>
>>>>> I work in the domain of real-time audio processing. A problem that is=
=20
>>>>> really common is to have a high priority thread (the audio device cal=
lback)=20
>>>>> needing to send, receive messages or exchange data in general with ot=
her=20
>>>>> thread (like the main application thread running the GUI).
>>>>>
>>>>> To do this I use Lock free FIFOs most of the time. The code I have=20
>>>>> for this is based on the publications of Herb Sutter among others. He=
re is=20
>>>>> a list of interesting articles about this issue :=20
>>>>> http://globalengineer.wordpress.com/2008/10/31/lock-free-queue-articl=
es-on-dr-dobbs-journal/
>>>>>
>>>>> I=92m really happy to see the new <atomic> feature, it is so nice=20
>>>>> because I will not have to write CompareAndSwapInt macros anymore to =
have=20
>>>>> portable code between MacOS, and Windows (and soon perhaps Android, i=
OS =85),=20
>>>>> that will clearly make my code simpler. Also I see that there is a gr=
oup=20
>>>>> working hard on the transactional memory problem. And this is also=20
>>>>> important because I=92m not really good with the memory barriers issu=
es but I=20
>>>>> had to code something using non-portable API to do create a multi wri=
ter=20
>>>>> multi reader FIFO that is really thread safe on multi core architectu=
res=20
>>>>> and I hope that the SG5 will make my life easier and this implementat=
ion=20
>>>>> safer with more clean code.
>>>>>
>>>>> So I just wonder, why not adding lock free FIFO to the standard ? (As=
=20
>>>>> I think I might not be the only one with this issue). And obviously t=
his=20
>>>>> idea can be extended to more containers even if I don=92t think it wo=
uld be=20
>>>>> useful for any container.
>>>>>
>>>>> In my search for existing libraries that are LGPL or other open=20
>>>>> licenses, I found this http://www.liblfds.org/, where there is such a=
=20
>>>>> library without any license.
>>>>>
>>>>> Would you think this would be useful to have this ?
>>>>>
>>>>> Note :
>>>>> I don=92t know if this is already included in any other proposal, I d=
id=20
>>>>> not find this in the forum of future proposals and I don=92t think th=
is is=20
>>>>> already a part of the standard nor the SG5 papers.
>>>>> I=92m really sorry if I was wrong, if this already exist, could you=
=20
>>>>> please tell me.*
>>>>>
>>>>  --=20
> =20
> =20
> =20
> =20

--=20




------=_Part_1062_21371949.1352928640130
Content-Type: text/html; charset=windows-1252
Content-Transfer-Encoding: quoted-printable

Hi<div><br></div><div>I did not know about this could you tell me which lib=
 would implement that in the future ?</div><div><br></div><div>Another thin=
g I would like to mention is the need to have a standard solution(s) for dy=
namic allocation without lock or lock free pools of memory which would also=
 be &nbsp;thread safe obviously.</div><div>I Checked out the tlsf allocator=
 idea, and the&nbsp;http://locklessinc.com/ lib. I don't know if this is th=
read safe.</div><div><br></div><div>Anyway I think that the<b> multimedia a=
pplications and critical performance applications are often using C++ and n=
eed wait free and thread safe solutions for containers AND allocation of th=
e objects inside the containers</b>. This is also important for game progra=
mming, and that is one of the thing <u>that makes C++ so much more interest=
ing than other languages but coding that kind of stuff is hard, error prone=
..<br></u><br>Thank you for any informations you would have about this getti=
ng to be standardized</div><div><br></div><div>PS, I checked the transactio=
nal memory stuff it is not really clear to me yet but it looks like this ma=
y have applications in such things as lock free, thread safe code but what =
I need is more the high level stuff (containers and allocation) even if the=
 implementation is not yet based on transactional memory.</div><div><br></d=
iv><div>Best<br><br>Le dimanche 11 novembre 2012 07:54:28 UTC+1, Tony V E a=
 =E9crit&nbsp;:<blockquote class=3D"gmail_quote" style=3D"margin: 0;margin-=
left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;"><div>There are =
also lockfree structures currently making their way into boost.<br><br><div=
>Sent from my BlackBerry=AE PlayBook=99<br><a href=3D"http://www.blackberry=
..com" target=3D"_blank">www.blackberry.com</a></div>
<br><hr><div><strong>From:</strong> "adrien courdavault" &lt;<a href=3D"jav=
ascript:" target=3D"_blank" gdf-obfuscated-mailto=3D"TNkIgSVOqSQJ">adrien..=
..@gmail.com</a>&gt;<br><strong>To:</strong> "<a href=3D"javascript:" target=
=3D"_blank" gdf-obfuscated-mailto=3D"TNkIgSVOqSQJ">std-pr...@isocpp.org</a>=
" &lt;<a href=3D"javascript:" target=3D"_blank" gdf-obfuscated-mailto=3D"TN=
kIgSVOqSQJ">std-pr...@isocpp.org</a>&gt;<br>
<strong>Sent:</strong> 5 November, 2012 5:20 PM<br><strong>Subject:</strong=
> [std-proposals] Re: Lock free fifo, stack<br></div><br>Yes there is a non=
 free commercial version indead.<div><br></div><div>Le lundi 5 novembre 201=
2 22:48:21 UTC+1, DeadMG a =E9crit&nbsp;:<blockquote class=3D"gmail_quote" =
style=3D"margin:0;margin-left:0.8ex;border-left:1px #ccc solid;padding-left=
:1ex">
I believe one of the study groups is a concurrency working group, which is =
looking at this. TBB is commercial, as well as GPL, I think.<br><br>On Mond=
ay, November 5, 2012 9:38:38 PM UTC, adrien courdavault wrote:<blockquote c=
lass=3D"gmail_quote" style=3D"margin:0;margin-left:0.8ex;border-left:1px #c=
cc solid;padding-left:1ex">
Thank you for the information.<div>When you say the standard is looking at =
it, do you mean it is already studied by one of the groups ?</div><div><br>=
</div><div>I did not know about the PPL.</div><div>However I remember havin=
g a look at Intel's TBB but I think this is GPL.</div>
<div><br></div><div>Best<br><br>Le lundi 5 novembre 2012 22:19:27 UTC+1, De=
adMG a =E9crit&nbsp;:<blockquote class=3D"gmail_quote" style=3D"margin:0;ma=
rgin-left:0.8ex;border-left:1px #ccc solid;padding-left:1ex">The Standard i=
s certainly looking at adding it. But you can find high-quality implementat=
ions in TBB and PPL.<br>
<br>On Monday, November 5, 2012 8:38:37 PM UTC, adrien courdavault wrote:<b=
lockquote class=3D"gmail_quote" style=3D"margin:0;margin-left:0.8ex;border-=
left:1px #ccc solid;padding-left:1ex"><b style=3D"color:rgb(0,0,0);font-fam=
ily:'Times New Roman';font-size:medium;font-weight:normal"><span style=3D"f=
ont-size:15px;font-family:Arial;background-color:transparent;white-space:pr=
e-wrap">Hi everyone,</span><br>
<span style=3D"font-size:15px;font-family:Arial;background-color:transparen=
t;white-space:pre-wrap"></span><br><span style=3D"font-size:15px;font-famil=
y:Arial;background-color:transparent;white-space:pre-wrap">I work in the do=
main of real-time audio processing. A problem that is really common is to h=
ave a high priority thread (the audio device callback) needing to send, rec=
eive messages or exchange data in general with other thread (like the main =
application thread running the GUI).</span><br>
<span style=3D"font-size:15px;font-family:Arial;background-color:transparen=
t;white-space:pre-wrap"></span><br><span style=3D"font-size:15px;font-famil=
y:Arial;background-color:transparent;white-space:pre-wrap">To do this I use=
 </span><span style=3D"font-size:15px;font-family:Arial;background-color:tr=
ansparent;font-weight:bold;white-space:pre-wrap">Lock free FIFOs</span><spa=
n style=3D"font-size:15px;font-family:Arial;background-color:transparent;wh=
ite-space:pre-wrap"> most of the time. The code I have for this is based on=
 the publications of Herb Sutter among others. Here is a list of interestin=
g articles about this issue : </span><a href=3D"http://globalengineer.wordp=
ress.com/2008/10/31/lock-free-queue-articles-on-dr-dobbs-journal/" target=
=3D"_blank"><span style=3D"font-size:15px;font-family:Arial;background-colo=
r:transparent;text-decoration:underline;white-space:pre-wrap">http://global=
engineer.<wbr>wordpress.com/2008/10/31/lock-<wbr>free-queue-articles-on-dr-=
<wbr>dobbs-journal/</span></a><span style=3D"font-size:15px;font-family:Ari=
al;background-color:transparent;white-space:pre-wrap"></span><br>
<span style=3D"font-size:15px;font-family:Arial;background-color:transparen=
t;white-space:pre-wrap"></span><br><span style=3D"font-size:15px;font-famil=
y:Arial;background-color:transparent;white-space:pre-wrap">I=92m really hap=
py to see the new &lt;atomic&gt; feature, it is so nice because I will not =
have to write CompareAndSwapInt macros anymore to have portable code betwee=
n MacOS, and Windows (and soon perhaps Android, iOS =85), that will clearly=
 make my code simpler. Also I see that there is a group working hard on the=
 transactional memory problem. And this is also important because I=92m not=
 really good with the memory barriers issues but I had to code something us=
ing non-portable API to do create a multi writer multi reader FIFO that is =
really thread safe on multi core architectures and I hope that the SG5 will=
 make my life easier and this implementation safer with more clean code.</s=
pan><br>
<span style=3D"font-size:15px;font-family:Arial;background-color:transparen=
t;white-space:pre-wrap"></span><br><span style=3D"font-size:15px;font-famil=
y:Arial;background-color:transparent;white-space:pre-wrap">So I just wonder=
, why not adding lock free FIFO to the standard ? (As I think I might not b=
e the only one with this issue). And obviously this idea can be extended to=
 more containers even if I don=92t think it would be useful for any contain=
er.</span><br>
<span style=3D"font-size:15px;font-family:Arial;background-color:transparen=
t;white-space:pre-wrap"></span><br><span style=3D"font-size:15px;font-famil=
y:Arial;background-color:transparent;white-space:pre-wrap">In my search for=
 existing libraries that are LGPL or other open licenses, I found this </sp=
an><a href=3D"http://www.liblfds.org/" target=3D"_blank"><span style=3D"fon=
t-size:15px;font-family:Arial;background-color:transparent;text-decoration:=
underline;white-space:pre-wrap">http://www.liblfds.org/</span></a><span sty=
le=3D"font-size:15px;font-family:Arial;background-color:transparent;white-s=
pace:pre-wrap">, where there is such a library without any license.</span><=
br>
<span style=3D"font-size:15px;font-family:Arial;background-color:transparen=
t;white-space:pre-wrap"></span><br><span style=3D"font-size:15px;font-famil=
y:Arial;background-color:transparent;white-space:pre-wrap">Would you think =
this would be useful to have this ?</span><br>
<span style=3D"font-size:15px;font-family:Arial;background-color:transparen=
t;white-space:pre-wrap"></span><br><span style=3D"font-size:15px;font-famil=
y:Arial;background-color:transparent;white-space:pre-wrap">Note :</span><br=
>
<span style=3D"font-size:15px;font-family:Arial;background-color:transparen=
t;white-space:pre-wrap">I don=92t know if this is already included in any o=
ther proposal, I did not find this in the forum of future proposals and I d=
on=92t think this is already a part of the standard nor the SG5 papers.</sp=
an><br>
<span>I=92m really sorry if I was wrong, if this already exist, could you p=
lease tell me.</span></b><br></blockquote></blockquote></div>
</blockquote></blockquote></div>

<p></p>

-- <br>
&nbsp;<br>
&nbsp;<br>
&nbsp;<br>
</div>
</blockquote></div>

<p></p>

-- <br />
&nbsp;<br />
&nbsp;<br />
&nbsp;<br />

------=_Part_1062_21371949.1352928640130--

.


Author: Tony V E <tvaneerd@gmail.com>
Date: Thu, 15 Nov 2012 00:25:53 -0500
Raw View
On Wed, Nov 14, 2012 at 4:30 PM, adrien courdavault
<adrien59cadri@gmail.com> wrote:
> Hi
>
> I did not know about this could you tell me which lib would implement that
> in the future ?
>

Surprisingly enough it is (or will be) called Boost.Lockfree.  It
should be in Boost "real soon now" although it was waiting for
Boost.Atomic to get in first.  Googling should be able to find the
latest version of it.

> Another thing I would like to mention is the need to have a standard
> solution(s) for dynamic allocation without lock or lock free pools of memory
> which would also be  thread safe obviously.
> I Checked out the tlsf allocator idea, and the http://locklessinc.com/ lib.
> I don't know if this is thread safe.
>

Yes lock-free allocation would be nice (but hard :-).  I don't think
Boost.Lockfree has that (yet).  Depending on requirements, there could
be a number of different implementation tradeoffs.  ie whether your
memory typically gets allocated/freed by the same thread, or allocated
by one and freed by another.

> Anyway I think that the multimedia applications and critical performance
> applications are often using C++ and need wait free and thread safe

"wait free" is not the same as "lock free" by the way.  "wait free" is
harder (but nicer if you can get it).  See
http://en.wikipedia.org/wiki/Non-blocking_algorithm .  Also note
"obstruction free", which is probably the one most closely related to
transactional memory (they both employ a "hope for the best"
strategy).


Yes, I'd like to see much of this in the standard, and the concurrency
group is looking into it.  Personally, I think one of the difficult
tasks will be finding a way to specify constraints, and also to allow
programmers to select different containers based on needs - ie a
single consumer multi producer FIFO could be implemented with
different trade-offs than a multi-consumer single producer, etc for
other combinations (also fixed size vs dynamic, etc).  Do these
options become "policies" of the container template?

Tony

--




.


Author: adrien courdavault <adrien59cadri@gmail.com>
Date: Thu, 15 Nov 2012 05:30:19 -0800 (PST)
Raw View
------=_Part_105_12201714.1352986219920
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

hi

Yes indeed lock free !=3D wait free. And I need wait free solution.
BTW thank you for the link.

Thank you for the information about the boost lock free. I 've found the=20
page of pending libs, it says depending on Atomic.
I have to check exaclty what is Boost Atomic, because I thought most of the=
=20
problem could be solved using c++11 <atomic>

For now I would be happy to have lock free solutions with "try" actions to=
=20
be able to manage the time limit myself. But it would truly be nice to have=
=20
it too :) .

Clearly as you say it would be hard to specify this. A policy based=20
solution sounds much nicer implementation than just specific containers=20
especially for the dynamic allocation or not.
For the allocation I often implement this currently with fixed size=20
messages using pools for memory use optimization.
That is a bit limited for a library of the STL ;)


Best

Adrien

PS @gurus working on the std: I know this sounds griddy to want more STD=20
because so many great people are doing there best and I clearly would be=20
happy to help if I could.


Le jeudi 15 novembre 2012 06:25:55 UTC+1, Tony V E a =E9crit :
>
> On Wed, Nov 14, 2012 at 4:30 PM, adrien courdavault=20
> <adrien...@gmail.com <javascript:>> wrote:=20
> > Hi=20
> >=20
> > I did not know about this could you tell me which lib would implement=
=20
> that=20
> > in the future ?=20
> >=20
>
> Surprisingly enough it is (or will be) called Boost.Lockfree.  It=20
> should be in Boost "real soon now" although it was waiting for=20
> Boost.Atomic to get in first.  Googling should be able to find the=20
> latest version of it.=20
>
> > Another thing I would like to mention is the need to have a standard=20
> > solution(s) for dynamic allocation without lock or lock free pools of=
=20
> memory=20
> > which would also be  thread safe obviously.=20
> > I Checked out the tlsf allocator idea, and the http://locklessinc.com/l=
ib.=20
> > I don't know if this is thread safe.=20
> >=20
>
> Yes lock-free allocation would be nice (but hard :-).  I don't think=20
> Boost.Lockfree has that (yet).  Depending on requirements, there could=20
> be a number of different implementation tradeoffs.  ie whether your=20
> memory typically gets allocated/freed by the same thread, or allocated=20
> by one and freed by another.=20
>
> > Anyway I think that the multimedia applications and critical performanc=
e=20
> > applications are often using C++ and need wait free and thread safe=20
>
> "wait free" is not the same as "lock free" by the way.  "wait free" is=20
> harder (but nicer if you can get it).  See=20
> http://en.wikipedia.org/wiki/Non-blocking_algorithm .  Also note=20
> "obstruction free", which is probably the one most closely related to=20
> transactional memory (they both employ a "hope for the best"=20
> strategy).=20
>
>
> Yes, I'd like to see much of this in the standard, and the concurrency=20
> group is looking into it.  Personally, I think one of the difficult=20
> tasks will be finding a way to specify constraints, and also to allow=20
> programmers to select different containers based on needs - ie a=20
> single consumer multi producer FIFO could be implemented with=20
> different trade-offs than a multi-consumer single producer, etc for=20
> other combinations (also fixed size vs dynamic, etc).  Do these=20
> options become "policies" of the container template?=20
>
> Tony=20
>

--=20




------=_Part_105_12201714.1352986219920
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

hi<br><br>Yes indeed lock free !=3D wait free. And I need wait free solutio=
n.<br>BTW thank you for the link.<br><br>Thank you for the information abou=
t the boost lock free. I 've found the page of pending libs, it says depend=
ing on Atomic.<br>I have to check exaclty what is Boost Atomic, because I t=
hought most of the problem could be solved using c++11 &lt;atomic&gt;<br><b=
r>For now I would be happy to have lock free solutions with "try" actions t=
o be able to manage the time limit myself. But it would truly be nice to ha=
ve it too :) .<br><br>Clearly as you say it would be hard to specify this. =
A policy based solution sounds much nicer implementation than just specific=
 containers especially for the dynamic allocation or not.<br>For the alloca=
tion I often implement this currently with fixed size messages using pools =
for memory use optimization.<br>That is a bit limited for a library of the =
STL ;)<br><br><br>Best<br><br>Adrien<br><br>PS @gurus working on the std: I=
 know this sounds griddy to want more STD because so many great people are =
doing there best and I clearly would be happy to help if I could.<br><br><b=
r>Le jeudi 15 novembre 2012 06:25:55 UTC+1, Tony V E a =E9crit&nbsp;:<block=
quote class=3D"gmail_quote" style=3D"margin: 0;margin-left: 0.8ex;border-le=
ft: 1px #ccc solid;padding-left: 1ex;">On Wed, Nov 14, 2012 at 4:30 PM, adr=
ien courdavault
<br>&lt;<a href=3D"javascript:" target=3D"_blank" gdf-obfuscated-mailto=3D"=
JfJnso5vDewJ">adrien...@gmail.com</a>&gt; wrote:
<br>&gt; Hi
<br>&gt;
<br>&gt; I did not know about this could you tell me which lib would implem=
ent that
<br>&gt; in the future ?
<br>&gt;
<br>
<br>Surprisingly enough it is (or will be) called Boost.Lockfree. &nbsp;It
<br>should be in Boost "real soon now" although it was waiting for
<br>Boost.Atomic to get in first. &nbsp;Googling should be able to find the
<br>latest version of it.
<br>
<br>&gt; Another thing I would like to mention is the need to have a standa=
rd
<br>&gt; solution(s) for dynamic allocation without lock or lock free pools=
 of memory
<br>&gt; which would also be &nbsp;thread safe obviously.
<br>&gt; I Checked out the tlsf allocator idea, and the <a href=3D"http://l=
ocklessinc.com/" target=3D"_blank">http://locklessinc.com/</a> lib.
<br>&gt; I don't know if this is thread safe.
<br>&gt;
<br>
<br>Yes lock-free allocation would be nice (but hard :-). &nbsp;I don't thi=
nk
<br>Boost.Lockfree has that (yet). &nbsp;Depending on requirements, there c=
ould
<br>be a number of different implementation tradeoffs. &nbsp;ie whether you=
r
<br>memory typically gets allocated/freed by the same thread, or allocated
<br>by one and freed by another.
<br>
<br>&gt; Anyway I think that the multimedia applications and critical perfo=
rmance
<br>&gt; applications are often using C++ and need wait free and thread saf=
e
<br>
<br>"wait free" is not the same as "lock free" by the way. &nbsp;"wait free=
" is
<br>harder (but nicer if you can get it). &nbsp;See
<br><a href=3D"http://en.wikipedia.org/wiki/Non-blocking_algorithm" target=
=3D"_blank">http://en.wikipedia.org/wiki/<wbr>Non-blocking_algorithm</a> . =
&nbsp;Also note
<br>"obstruction free", which is probably the one most closely related to
<br>transactional memory (they both employ a "hope for the best"
<br>strategy).
<br>
<br>
<br>Yes, I'd like to see much of this in the standard, and the concurrency
<br>group is looking into it. &nbsp;Personally, I think one of the difficul=
t
<br>tasks will be finding a way to specify constraints, and also to allow
<br>programmers to select different containers based on needs - ie a
<br>single consumer multi producer FIFO could be implemented with
<br>different trade-offs than a multi-consumer single producer, etc for
<br>other combinations (also fixed size vs dynamic, etc). &nbsp;Do these
<br>options become "policies" of the container template?
<br>
<br>Tony
<br></blockquote>

<p></p>

-- <br />
&nbsp;<br />
&nbsp;<br />
&nbsp;<br />

------=_Part_105_12201714.1352986219920--

.


Author: =?UTF-8?Q?Klaim_=2D_Jo=C3=ABl_Lamotte?= <mjklaim@gmail.com>
Date: Thu, 15 Nov 2012 16:03:54 +0100
Raw View
--e89a8ff1c3a8a7f81604ce89f515
Content-Type: text/plain; charset=ISO-8859-1

On Thu, Nov 15, 2012 at 2:30 PM, adrien courdavault <adrien59cadri@gmail.com
> wrote:

> I have to check exaclty what is Boost Atomic, because I thought most of
> the problem could be solved using c++11 <atomic>


It is an implementation of atomic library but it works in C++03 too. Boost
can't yet totally rely on C++11.

Joel Lamotte

--




--e89a8ff1c3a8a7f81604ce89f515
Content-Type: text/html; charset=ISO-8859-1

<div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Nov 15, 2012 at 2:30 PM, adrien courdavault <span dir="ltr">&lt;<a href="mailto:adrien59cadri@gmail.com" target="_blank">adrien59cadri@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I have to check exaclty what is Boost Atomic, because I thought most of the problem could be solved using c++11 &lt;atomic&gt;</blockquote>
</div><br></div><div class="gmail_extra">It is an implementation of atomic library but it works in C++03 too. Boost can&#39;t yet totally rely on C++11.<br><br>Joel Lamotte</div><div class="gmail_extra"><br></div>

<p></p>

-- <br />
&nbsp;<br />
&nbsp;<br />
&nbsp;<br />

--e89a8ff1c3a8a7f81604ce89f515--

.


Author: adrien courdavault <adrien59cadri@gmail.com>
Date: Thu, 15 Nov 2012 07:29:02 -0800 (PST)
Raw View
------=_Part_1975_988333.1352993342800
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

Hi

Yes that is true too, Anyway boost is great.
I will take a look at it.

I also checked the wait free implementation, the performance are not great=
=20
but still acceptable.( wait free fifo=20
http://www.cs.technion.ac.il/~sakogan/papers/ppopp11.pdf)
I will try to see if there is a way to implement this or if there is=20
already open libraries offering this kind of wait free solution.
I will also dive in the open-std.org website to find what is planned by the=
=20
SG1 oncurrency goup.

best



Le jeudi 15 novembre 2012 16:03:55 UTC+1, Klaim - Jo=EBl Lamotte a =E9crit =
:
>
>
>
> On Thu, Nov 15, 2012 at 2:30 PM, adrien courdavault <adrien...@gmail.com<=
javascript:>
> > wrote:
>
>> I have to check exaclty what is Boost Atomic, because I thought most of=
=20
>> the problem could be solved using c++11 <atomic>
>
>
> It is an implementation of atomic library but it works in C++03 too. Boos=
t=20
> can't yet totally rely on C++11.
>
> Joel Lamotte
>
>

--=20




------=_Part_1975_988333.1352993342800
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

Hi<br><br>Yes that is true too, Anyway boost is great.<br>I will take a loo=
k at it.<br><br>I also checked the wait free implementation, the performanc=
e are not great but still acceptable.( wait free fifo http://www.cs.technio=
n.ac.il/~sakogan/papers/ppopp11.pdf)<br>I will try to see if there is a way=
 to implement this or if there is already open libraries offering this kind=
 of wait free solution.<br>I will also dive in the open-std.org website to =
find what is planned by the SG1 oncurrency goup.<br><br>best<br><br><br><br=
>Le jeudi 15 novembre 2012 16:03:55 UTC+1, Klaim - Jo=EBl Lamotte a =E9crit=
&nbsp;:<blockquote class=3D"gmail_quote" style=3D"margin: 0;margin-left: 0.=
8ex;border-left: 1px #ccc solid;padding-left: 1ex;"><div><br><br><div class=
=3D"gmail_quote">On Thu, Nov 15, 2012 at 2:30 PM, adrien courdavault <span =
dir=3D"ltr">&lt;<a href=3D"javascript:" target=3D"_blank" gdf-obfuscated-ma=
ilto=3D"yJHTRFc-MwsJ">adrien...@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex">I have to check exaclty what is Boost Atomic=
, because I thought most of the problem could be solved using c++11 &lt;ato=
mic&gt;</blockquote>
</div><br></div><div>It is an implementation of atomic library but it works=
 in C++03 too. Boost can't yet totally rely on C++11.<br><br>Joel Lamotte</=
div><div><br></div>
</blockquote>

<p></p>

-- <br />
&nbsp;<br />
&nbsp;<br />
&nbsp;<br />

------=_Part_1975_988333.1352993342800--

.