<?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/b/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>Telligent Evolution Platform Developer Build (Build: 5.6.50428.7875)</generator><item><title>re: Feedback requested: TaskManager shutdown, Fair scheduling</title><link>http://blogs.msdn.com/b/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;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9441785" width="1" height="1"&gt;</description></item><item><title>re: Feedback requested: TaskManager shutdown, Fair scheduling</title><link>http://blogs.msdn.com/b/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>Stephen Toub - MSFT</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;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9435565" width="1" height="1"&gt;</description></item><item><title>re: Feedback requested: TaskManager shutdown, Fair scheduling</title><link>http://blogs.msdn.com/b/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;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9434935" width="1" height="1"&gt;</description></item><item><title>re: Feedback requested: TaskManager shutdown, Fair scheduling</title><link>http://blogs.msdn.com/b/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;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9005927" width="1" height="1"&gt;</description></item><item><title>Please implement some kind of priorization</title><link>http://blogs.msdn.com/b/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;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8952294" width="1" height="1"&gt;</description></item><item><title>re: Feedback requested: TaskManager shutdown, Fair scheduling</title><link>http://blogs.msdn.com/b/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>Stephen Toub - MSFT</dc:creator><description>&lt;p&gt;Great, thanks for the examples.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8890755" width="1" height="1"&gt;</description></item><item><title>re: Feedback requested: TaskManager shutdown, Fair scheduling</title><link>http://blogs.msdn.com/b/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;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8840353" width="1" height="1"&gt;</description></item><item><title>re: Feedback requested: TaskManager shutdown, Fair scheduling</title><link>http://blogs.msdn.com/b/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;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8839618" width="1" height="1"&gt;</description></item><item><title>re: Feedback requested: TaskManager shutdown, Fair scheduling</title><link>http://blogs.msdn.com/b/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>Stephen Toub - MSFT</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;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8835546" width="1" height="1"&gt;</description></item><item><title>re: Feedback requested: TaskManager shutdown, Fair scheduling</title><link>http://blogs.msdn.com/b/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;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8831383" width="1" height="1"&gt;</description></item></channel></rss>