Re: [Algorithms] General purpose task parallel threading approach
Brought to you by:
vexxed72
|
From: Tim A. <tim...@gm...> - 2009-04-04 09:19:56
|
On Fri, Apr 3, 2009 at 10:55 PM, <asy...@gm...> wrote: > > As far as I know this is the most common approach as well, because it is > less error prone. On the other side, in standard threads, or any job system > I've heard about, this approach is not efficient because it blocks the > execution thread. Lock-free algorithms are, in some ways, less error-prone. In particular, correctly-implemented lock-free algorithms cannot deadlock, and prevent priority inversion. > >I'm not quite sure what your library provides to the domain of game > development > That's what I would like your feedback on. In that case, I again suggest you provide some specific use cases. What problems did you run into that led you to write the library? How does the library you wrote solve the specific problems you encountered? --Tim A. > 2009/4/3 Tim Ambrogi <tim...@gm...> > > Alexander- >> Coroutines are an implementation of cooperative multi-tasking. There are >> implementations in various dynamic languages, such as Lua and Stackless >> Python. Also, there are less-portable implementations in C++ that involve >> inline assembly, setjmp/longjmp, fibers, etc... depending on the platform. >> See http://en.wikipedia.org/wiki/Coroutine for more info. >> >> It sounds, however, like you also want to write lower-level, >> performance-critical systems such as rendering, physics, serialization, >> etc... across many threads/cores. Your library is similar in silhouette to >> the popular and fairly general job system, where you break down >> parallelizable tasks in N jobs that are tasked to idle threads. These jobs >> aim to either minimize contention on shared resources, or operate in a >> wait-free manner on said resources. If wait-free operation cannot be >> achieved within the domain, you usually try a lock-free approach that >> enables different threads to assist obstructing threads in completing their >> tasks while you wait. As a last resort, you fall back on traditional >> synchronization primitives if you can find no more efficient approach. >> >> I'm not quite sure what your library provides to the domain of game >> development, but I'm sure it was motivated by a specific problem you >> encountered. Perhaps you should describe your use cases more specifically, >> given that the stated domain of your library seems overly broad? >> >> --Tim A. >> >> >> On Fri, Apr 3, 2009 at 12:27 PM, <asy...@gm...> wrote: >> >>> What do you mean ? >>> >>> Alexander. >>> >>> 2009/4/3 Gregory Junker <gj...@da...> >>> >>>> Isn’t this where coroutines come into play? >>>> >>>> >>>> Greg >>>> >>>> >>>> >>>> >>>> ------------------------------------------------------------------------------ >>>> >>>> _______________________________________________ >>>> GDAlgorithms-list mailing list >>>> GDA...@li... >>>> https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list >>>> Archives: >>>> >>>> http://sourceforge.net/mailarchive/forum.php?forum_name=gdalgorithms-list >>>> >>> >>> >>> >>> ------------------------------------------------------------------------------ >>> >>> _______________________________________________ >>> GDAlgorithms-list mailing list >>> GDA...@li... >>> https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list >>> Archives: >>> http://sourceforge.net/mailarchive/forum.php?forum_name=gdalgorithms-list >>> >> >> >> >> ------------------------------------------------------------------------------ >> >> _______________________________________________ >> GDAlgorithms-list mailing list >> GDA...@li... >> https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list >> Archives: >> http://sourceforge.net/mailarchive/forum.php?forum_name=gdalgorithms-list >> > > > > ------------------------------------------------------------------------------ > > _______________________________________________ > GDAlgorithms-list mailing list > GDA...@li... > https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list > Archives: > http://sourceforge.net/mailarchive/forum.php?forum_name=gdalgorithms-list > |