<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Feedback requested: TaskManager shutdown, Fair scheduling</title><link>http://blogs.msdn.com/pfxteam/archive/2008/08/01/8800195.aspx</link><description>One of the primary reasons we've released CTPs of Parallel Extensions is to solicit feedback on the design and functionality it provides.&amp;#160; Does it provide all of the APIs you need to get your job done?&amp;#160; Are there scenarios you wished the APIs</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>re: Feedback requested: TaskManager shutdown, Fair scheduling</title><link>http://blogs.msdn.com/pfxteam/archive/2008/08/01/8800195.aspx#8801169</link><pubDate>Fri, 01 Aug 2008 21:07:14 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8801169</guid><dc:creator>art_scott@msn.com</dc:creator><description>&lt;p&gt;What are the implications for games and media, like HD motion pictures? Or both together?&lt;/p&gt;
</description></item><item><title>re: Feedback requested: TaskManager shutdown, Fair scheduling</title><link>http://blogs.msdn.com/pfxteam/archive/2008/08/01/8800195.aspx#8801173</link><pubDate>Fri, 01 Aug 2008 21:08:12 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8801173</guid><dc:creator>Thomas Danecker</dc:creator><description>&lt;p&gt;Some sort of fairness is a must! It doesn't have to be a fifo; it should be ok to prefer &amp;quot;fresh&amp;quot; tasks as long as older tasks get a chance and the problem of possible starvation is taken into account. With the use of the TPL, we should be able to easily create a lot of small tasks without having to worry about scheduling and associated problems like starvation/fairness (the TPL should choose the most performant - but fair enough - approach to process all the tasks we throw at it). On the other hand, we also should have the possibility to force strong fifo order, in the case our model relies on that fact (e.g. when a task manager is used as a workqueue - though I would still prefer an own WPF-like Dispatcher for that purpose).&lt;/p&gt;
</description></item><item><title>re: Feedback requested: TaskManager shutdown, Fair scheduling</title><link>http://blogs.msdn.com/pfxteam/archive/2008/08/01/8800195.aspx#8803469</link><pubDate>Sat, 02 Aug 2008 04:23:25 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8803469</guid><dc:creator>toub</dc:creator><description>&lt;p&gt;Thomas, thanks for the feedback. &amp;nbsp;Can you elaborate on the scenarios where this freshness is important? &amp;nbsp;For these scenarios, are you creating the tasks from within other tasks or from outside of the target scheduler's threads?&lt;/p&gt;
</description></item><item><title>re: Feedback requested: TaskManager shutdown, Fair scheduling</title><link>http://blogs.msdn.com/pfxteam/archive/2008/08/01/8800195.aspx#8803474</link><pubDate>Sat, 02 Aug 2008 04:24:26 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8803474</guid><dc:creator>toub</dc:creator><description>&lt;p&gt;art_scott, it really depends on particular algorithms. &amp;nbsp;Could you elaborate?&lt;/p&gt;
</description></item><item><title>re: Feedback requested: TaskManager shutdown, Fair scheduling</title><link>http://blogs.msdn.com/pfxteam/archive/2008/08/01/8800195.aspx#8804227</link><pubDate>Sat, 02 Aug 2008 07:20:20 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8804227</guid><dc:creator>Justin James</dc:creator><description>&lt;p&gt;I originally got very interested in PEL because I thought that it would support a true fork()/join(). I've used it, and I like the library, but I think that fork()/join() would be a really great thing, especially given the number of people already familiar and comfortable with that paradigm. I also think that fork()/join() offers a much lower complexity level than needing to handle delegates/lambda.&lt;/p&gt;
&lt;p&gt;J.Ja&lt;/p&gt;
</description></item><item><title>re: Feedback requested: TaskManager shutdown, Fair scheduling</title><link>http://blogs.msdn.com/pfxteam/archive/2008/08/01/8800195.aspx#8804877</link><pubDate>Sat, 02 Aug 2008 09:50:22 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8804877</guid><dc:creator>David</dc:creator><description>&lt;p&gt;Awhile back I write a application that needed to process a virtually unlimited amount of data. Essentially the data was being processes as fast as it came in. The application ran continuously with virtually no hope of catching up. As the data was processed its results became available for other parts of the system to use. If the data had been processed in a LIFO order than older data (if I understand this right) would never get processed. This would result in gaps and errors in the results. It was not essential that the data be processed in a strict FIFO manner but it was important that ALL data did get processed &amp;quot;near&amp;quot; each other. It sounds like this is an example where &amp;quot;Fairness&amp;quot; is prefered.&lt;/p&gt;
</description></item><item><title>re: Feedback requested: TaskManager shutdown, Fair scheduling</title><link>http://blogs.msdn.com/pfxteam/archive/2008/08/01/8800195.aspx#8805836</link><pubDate>Sat, 02 Aug 2008 20:09:06 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8805836</guid><dc:creator>Steffen Zeidler</dc:creator><description>&lt;p&gt;The TPL is designed to split efficiently CPU time consuming tasks on multi cores.&lt;/p&gt;
&lt;p&gt;Is it planed to use the TPL to control concurrency processes and real time tasks too?&lt;/p&gt;
&lt;p&gt;I think the Concurrency and Coordination Runtime (CCR) is in many aspects similar to the TPL (TaskManager/Dispatcher, Task/Task, Future/Port) and it would be nice to merge both in one library.&lt;/p&gt;
</description></item><item><title>re: Feedback requested: TaskManager shutdown, Fair scheduling</title><link>http://blogs.msdn.com/pfxteam/archive/2008/08/01/8800195.aspx#8829582</link><pubDate>Mon, 04 Aug 2008 12:31:50 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8829582</guid><dc:creator>Pointernil</dc:creator><description>&lt;p&gt;I think a way to influence the scheduling of tasks is a must.&lt;/p&gt;
&lt;p&gt;It's not only about FIFO or LIFO, a mechanism using a prioritization metric comes handy most of the time... &lt;/p&gt;
&lt;p&gt;my prefered impl. of such a metric uses mostly a combination of PRIO, SIZE and AGE of the task to decide what to execute next.&lt;/p&gt;
</description></item><item><title>re: Feedback requested: TaskManager shutdown, Fair scheduling</title><link>http://blogs.msdn.com/pfxteam/archive/2008/08/01/8800195.aspx#8831289</link><pubDate>Mon, 04 Aug 2008 18:39:19 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8831289</guid><dc:creator>Stephan</dc:creator><description>&lt;p&gt;Don't know where to deposit this feedback: I would really like to see Parallel.Do return. It simply is useful.&lt;/p&gt;
</description></item><item><title>re: Feedback requested: TaskManager shutdown, Fair scheduling</title><link>http://blogs.msdn.com/pfxteam/archive/2008/08/01/8800195.aspx#8831383</link><pubDate>Mon, 04 Aug 2008 19:10:25 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8831383</guid><dc:creator>dimkaz</dc:creator><description>&lt;p&gt;Fair scheduling or even better a priority queue would be very useful.&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;
</description></item><item><title>re: Feedback requested: TaskManager shutdown, Fair scheduling</title><link>http://blogs.msdn.com/pfxteam/archive/2008/08/01/8800195.aspx#8835546</link><pubDate>Wed, 06 Aug 2008 04:21:16 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8835546</guid><dc:creator>toub</dc:creator><description>&lt;p&gt;Thanks for all of the feedback! &amp;nbsp;This is great. &amp;nbsp;For those folks asking for prioritization, can you provide some real-world examples of how you'd use it?&lt;/p&gt;
&lt;p&gt;Stephan, the Do method has simply been renamed: it's now Parallel.Invoke rather than Parallel.Do.&lt;/p&gt;
</description></item><item><title>re: Feedback requested: TaskManager shutdown, Fair scheduling</title><link>http://blogs.msdn.com/pfxteam/archive/2008/08/01/8800195.aspx#8839618</link><pubDate>Thu, 07 Aug 2008 03:34:27 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8839618</guid><dc:creator>Rama</dc:creator><description>&lt;p&gt;I think it would be very useful to have both the sync, and asynch methods to stop the taskmanager, and most importantly it should support stopping even when the taskmanger is not done with all the tasks.&lt;/p&gt;
</description></item><item><title>re: Feedback requested: TaskManager shutdown, Fair scheduling</title><link>http://blogs.msdn.com/pfxteam/archive/2008/08/01/8800195.aspx#8840353</link><pubDate>Thu, 07 Aug 2008 09:06:34 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8840353</guid><dc:creator>David</dc:creator><description>&lt;p&gt;You want real-world example of a need for fair scheduling for a prioritization? There are hundreds of examples.&lt;/p&gt;
&lt;p&gt;For one, just about every manufactoring segment has worked on this problem. I know of many papers devoted to this from the chemical processing industry.&lt;/p&gt;
&lt;p&gt;&lt;a rel="nofollow" target="_new" href="http://docs.lib.purdue.edu/dissertations/AAI9540250/"&gt;http://docs.lib.purdue.edu/dissertations/AAI9540250/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;In my world I have tens of thousands of tasks that need to be farmed out to dozens of seperate machines. I don't necessary know or care what the tasks do. I do know they each can take from near 0 time to hours. I also have a variety of prioritize that need to be honored. Some tasks take require order (pri 1 must come before pri 2). Some must complete _before_ a specific time. That one is much more tricky.&lt;/p&gt;
&lt;p&gt;Recently I was asked to dynamically change the priority according to how much time it's been in the queue. In other words, the longer it's around the more likely it is to be processed sooner rather than later.&lt;/p&gt;
</description></item><item><title>re: Feedback requested: TaskManager shutdown, Fair scheduling</title><link>http://blogs.msdn.com/pfxteam/archive/2008/08/01/8800195.aspx#8890755</link><pubDate>Sat, 23 Aug 2008 23:36:15 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8890755</guid><dc:creator>toub</dc:creator><description>&lt;p&gt;Great, thanks for the examples.&lt;/p&gt;
</description></item><item><title>Please implement some kind of priorization</title><link>http://blogs.msdn.com/pfxteam/archive/2008/08/01/8800195.aspx#8952294</link><pubDate>Mon, 15 Sep 2008 12:39:27 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8952294</guid><dc:creator>Nikolas</dc:creator><description>&lt;p&gt;I would love to see some kind of priorization possibility for the fx library.&lt;/p&gt;
&lt;p&gt;Right now im handling that myself, but I cant believe that this wouldnt benefit a lot of people out there.&lt;/p&gt;
&lt;p&gt;Here is an easy example:&lt;/p&gt;
&lt;p&gt;Im continuously querying data from a trading platform.&lt;/p&gt;
&lt;p&gt;This data is the analyzed and if certain criterias are matched by the data actions are taken.&lt;/p&gt;
&lt;p&gt;Before theses actions are taken, an update is issued for the relevant subset of data, to be sure that for example the prices havent chanaged since the last update.&lt;/p&gt;
&lt;p&gt;This update has to be executed immediatly and can therefore not be handled by the continous update task queue.&lt;/p&gt;
&lt;p&gt;Right now this is handled by a second TaskManager wich handles the higher priotitized updates.&lt;/p&gt;
&lt;p&gt;The example is extremly simplified, if you are interested i can give a detailed description of this case.&lt;/p&gt;
</description></item><item><title>re: Feedback requested: TaskManager shutdown, Fair scheduling</title><link>http://blogs.msdn.com/pfxteam/archive/2008/08/01/8800195.aspx#9005927</link><pubDate>Sun, 19 Oct 2008 06:31:07 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9005927</guid><dc:creator>John Melville</dc:creator><description>&lt;p&gt;I have a scenerio where I would benefit from some kind of guarentee that a task will eventually execute.&lt;/p&gt;
&lt;p&gt;I am retrieving images out of a database, and I want to do the loading and decoding asynchronously. &amp;nbsp;My method fires off a task to load the image. &amp;nbsp;For ereyone who askes for the list while the task is executing I keep a record of who they were and return a default image. &amp;nbsp;When the task completes, I signal all the callers that the &amp;quot;final&amp;quot; value is availaible.&lt;/p&gt;
&lt;p&gt;This works great on my 4 proc desktop. &amp;nbsp;when I put it on my one proc laptop machine the task never completes.&lt;/p&gt;
&lt;p&gt;If I explicitly wait on the task, everything works on both the four proc and the one proc machine.&lt;/p&gt;
&lt;p&gt;My requirements are not hard, but I would really like a guarentee that a task will eventually get scheduled, even if nobody ever waits on it.&lt;/p&gt;
</description></item><item><title>re: Feedback requested: TaskManager shutdown, Fair scheduling</title><link>http://blogs.msdn.com/pfxteam/archive/2008/08/01/8800195.aspx#9434935</link><pubDate>Fri, 20 Feb 2009 00:17:51 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9434935</guid><dc:creator>Darshan Shah</dc:creator><description>&lt;p&gt;Some sort of fairness is absolutely necessary. &lt;/p&gt;
&lt;p&gt;Without fairness, only kinds of problems you can solve are purely algorithmic. (Where, you do not care if some tasks may take indefinite amount of time to get started). In my opinion, it is very limited scope of very large parallel world out there.&lt;/p&gt;
&lt;p&gt;In application domains, where you deal with physical world, such as process controls, test and measurement systems, simulations and even in massively parallel on-line games, tasks are started dynamically (their number is not known at compile time) and it can run for indefinite period of time because they life time is usually governed by external events. Applications in these domains simply cannot use TPL/Task Manager because task starvation for indefinite period of time is never acceptable.&lt;/p&gt;
&lt;p&gt;Therefore not only some sort of fairness but additional control over their scheduling is absolutely necessary to use task parallel libraries in any domains outside algorithmic one. Ideally you could have priority based round robin scheduling among tasks. I could also accomplish the same if I could plug-in my own thread-pool under TaskManager, which can anxiously create new threads with the right priority, based on tasks that are getting started, dynamically in controlled fashion. Alternatively, Task Manager could fire an event, if a task is starved for more than x amount of time, which can be used to create more threads by that event subscriber (user) if he wishes to.&lt;/p&gt;
</description></item><item><title>re: Feedback requested: TaskManager shutdown, Fair scheduling</title><link>http://blogs.msdn.com/pfxteam/archive/2008/08/01/8800195.aspx#9435565</link><pubDate>Fri, 20 Feb 2009 10:03:58 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9435565</guid><dc:creator>toub</dc:creator><description>&lt;p&gt;Thanks, everyone, for the great feedback!&lt;/p&gt;
&lt;p&gt;Darshan, we've implemented an extensibility mechanism very similar to what you're looking for.&lt;/p&gt;
&lt;p&gt;Also, based on all the good feedback here, we implemented a fairness mechanism.&lt;/p&gt;
&lt;p&gt;Stay tuned...&lt;/p&gt;
</description></item><item><title>re: Feedback requested: TaskManager shutdown, Fair scheduling</title><link>http://blogs.msdn.com/pfxteam/archive/2008/08/01/8800195.aspx#9441785</link><pubDate>Tue, 24 Feb 2009 00:22:55 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9441785</guid><dc:creator>darshanshah</dc:creator><description>&lt;p&gt;I am using VS2010 CTP (published on 10/31/2008) to evaluate task parallel libraries to enhance our scheduler. If viable, I would certainly like to test newer TPL bits that implements fairness scheduling of tasks and or any extensible mechanism to eliminate task starvation. How far is next CTP that will include enhancements of TPL/Task Manager?&lt;/p&gt;
</description></item></channel></rss>