| That's a good idea. It's a common way of implementing the
map-reduce pattern, which is what we are dealing with here. Why didn't I
think of it?
What I was thinking of is spinlocks, which should be quite low-overhead in this context. With a few threads, collisions are unlikely anyway.
In this context, a spinlock would be a single byte that can be atomically read or written. One thread would set it when starting to write, and unset it when done writing. The other threads would just keep trying to set it; if it's already set, they just spin around and try again until it is unset. This is the simplest example of lock free programming. There is no operating system overhead at all. As long as the time spent locked is small, which it should be in this context, this is usually the most scalable kind of lock.
We may want to try both approaches.
Regards,
Mike
----- Original Message -----
From: "Steven Yi"
To: "Michael Gogins" ; "Developer discussions"
Sent: Wednesday, August 06, 2008 5:09 PM
Subject: Re: [Cs-dev] When to time next release
> Oh, that reminds me, the other day I was walking down the street and
> thought we should make spout be local to the instrument instance, and
> the engine should mix all of the spouts from all of the instances into
> the main spout. That way, instances could be run in their own thread.
> The downside is an additional mixing step, but I think it might be a
> better design. Thoughts anyone?
>
> On Wed, Aug 6, 2008 at 1:57 PM, Michael Gogins
> wrote:
>> I think it's great that you are enabling blue to work with the API, and
>> I'm glad to hear you are proceeding with the multi-threading work.
>>
>> For my part, for the next release, I have some fixes for the linear
>> algebra opcodes, an updated CsoundAC.csd orchestra library, and I was
>> considering making spout and tables thread safe...
>>
>> Regards,
>> Mike
>>
>> -----Original Message-----
>>>From: Steven Yi
>>>Sent: Aug 6, 2008 3:29 PM
>>>To: Michael Gogins , Developer discussions
>>>
>>>Subject: Re: [Cs-dev] When to time next release
>>>
>>>I think it'd be nice before the conferences as well, though I don't
>>>know when the conferences are. Otherwise, I have no changes to commit
>>>at the moment, though I have planned to get started on some work to
>>>redo some structs to make gotos and labels (and consequently
>>>if-then's) work for multi-processor. I was going to start on that
>>>after getting blue going with the API which will finish up this week.
>>>So I will wait to do any checkins for the above csound work until
>>>after the next release.
>>>
>>>Thanks,
>>>steven
>>>
>>>On Wed, Aug 6, 2008 at 9:53 AM, Michael Gogins
>>>wrote:
>>>> And before these conferences would also be advisable... so people have
>>>> a chance to see what we are talking about.
>>>>
>>>> Is there a window post SourceForge update and pre conferences?
>>>>
>>>> Regards,
>>>> Mike
>>>>
>>>> -----Original Message-----
>>>>>From: victor
>>>>>Sent: Aug 6, 2008 12:31 PM
>>>>>To: Developer discussions
>>>>>Subject: Re: [Cs-dev] When to time next release
>>>>>
>>>>>How ready are we? Should we do this post-ICMC/DAFx or
>>>>>before?
>>>>>----- Original Message -----
>>>>>From: "jpff"
>>>>>To:
>>>>>Sent: Wednesday, August 06, 2008 5:05 PM
>>>>>Subject: [Cs-dev] When to time next release
>>>>>
>>>>>
>>>>>> Victor and I are back from vacations; so when should we plan to
>>>>>> release? Note that Sourceforge is moving on 18 August and that will
>>>>>> mean some down time in the repositories
>>>>>>
>>>>>> ==John ffitch
>>>>>>
>>>>>> -------------------------------------------------------------------------
>>>>>> This SF.Net email is sponsored by the Moblin Your Move Developer's
>>>>>> challenge
>>>>>> Build the coolest Linux based applications with Moblin SDK & win
>>>>>> great
>>>>>> prizes
>>>>>> Grand prize is a trip for two to an Open Source event anywhere in the
>>>>>> world
>>>>>> http://moblin-contest.org/redirect.php?banner_id=100&url=/
>>>>>> _______________________________________________
>>>>>> Csound-devel mailing list
>>>>>> Csound-devel@lists.sourceforge.net
>>>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>>>
>>>>>
>>>>>-------------------------------------------------------------------------
>>>>>This SF.Net email is sponsored by the Moblin Your Move Developer's
>>>>>challenge
>>>>>Build the coolest Linux based applications with Moblin SDK & win great
>>>>>prizes
>>>>>Grand prize is a trip for two to an Open Source event anywhere in the
>>>>>world
>>>>>http://moblin-contest.org/redirect.php?banner_id=100&url=/
>>>>>_______________________________________________
>>>>>Csound-devel mailing list
>>>>>Csound-devel@lists.sourceforge.net
>>>>>https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>>
>>>>
>>>>
>>>>
>>>> -------------------------------------------------------------------------
>>>> This SF.Net email is sponsored by the Moblin Your Move Developer's
>>>> challenge
>>>> Build the coolest Linux based applications with Moblin SDK & win great
>>>> prizes
>>>> Grand prize is a trip for two to an Open Source event anywhere in the
>>>> world
>>>> http://moblin-contest.org/redirect.php?banner_id=100&url=/
>>>> _______________________________________________
>>>> Csound-devel mailing list
>>>> Csound-devel@lists.sourceforge.net
>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>>
>>>
>>>-------------------------------------------------------------------------
>>>This SF.Net email is sponsored by the Moblin Your Move Developer's
>>>challenge
>>>Build the coolest Linux based applications with Moblin SDK & win great
>>>prizes
>>>Grand prize is a trip for two to an Open Source event anywhere in the
>>>world
>>>http://moblin-contest.org/redirect.php?banner_id=100&url=/
>>>_______________________________________________
>>>Csound-devel mailing list
>>>Csound-devel@lists.sourceforge.net
>>>https://lists.sourceforge.net/lists/listinfo/csound-devel
>>
>>
>>
>>
>> -------------------------------------------------------------------------
>> This SF.Net email is sponsored by the Moblin Your Move Developer's
>> challenge
>> Build the coolest Linux based applications with Moblin SDK & win great
>> prizes
>> Grand prize is a trip for two to an Open Source event anywhere in the
>> world
>> http://moblin-contest.org/redirect.php?banner_id=100&url=/
>> _______________________________________________
>> Csound-devel mailing list
>> Csound-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net |