टास्क पूरा होने के समय में बदलाव कैसे मेकप को प्रभावित करता है?


16

चलो का कहना है कि हम कार्य का एक बड़ा संग्रह है τ1,τ2,...,τn और समान का एक संग्रह प्रोसेसर (प्रदर्शन के संदर्भ में) ρ1,ρ2,...,ρm जो पूरी तरह से समानांतर में काम करते हैं। ब्याज की स्थितियों के लिए, हम यह मान सकते हैं mn । प्रत्येक τi एक प्रोसेसर ρ j को सौंपे जाने के बाद पूरा होने में कुछ समय / चक्र लेता हैρj, और एक बार इसे असाइन करने के बाद, इसे पूरा होने तक पुन: असाइन नहीं किया जा सकता है (प्रोसेसर हमेशा अंततः असाइन किए गए कार्यों को पूरा करते हैं)। मान लेते हैं कि प्रत्येक चलो τi समय की राशि लेता / चक्र Xi , नहीं, पहले से भी जाना जाता है कुछ असतत यादृच्छिक वितरण से लिया। : इस सवाल के लिए, हम भी एक सरल वितरण मान सकते हैं P(Xi=1)=P(Xi=5)=1/2 , और सभी Xi कर रहे हैं जोड़ो में स्वतंत्र। इसलिए μi=3 और σ2=4

मान लीजिए कि, सांख्यिकीय रूप से, समय / चक्र 0 पर, सभी कार्यों को समान रूप से सभी प्रोसेसरों को समान रूप से निर्दिष्ट किया जाता है, समान रूप से यादृच्छिक पर; इसलिए प्रत्येक प्रोसेसर ρj को n/m कार्य दिए गए हैं (हम प्रश्न के प्रयोजनों के लिए केवल मान सकते हैं m|n)। हम makespan समय / चक्र, जिस पर पिछले प्रोसेसर फोन ρ उसको दिए गए काम को पूरा करने, काम यह सौंपा गया था खत्म। पहला प्रश्न:

m , n , और कार्य के रूप Xiमें, मेपैन क्या है M? विशेष रूप से, क्या है E[M]? Var[M] ?

दूसरा सवाल:

मान लीजिए , और सभी एक्स मैं जोड़ो में स्वतंत्र हैं, इसलिए μ मैं = 3 और σ 2 = 1M , n और इन नए X i के फ़ंक्शन के रूप में, मेकपैन क्या है? अधिक दिलचस्प बात यह है कि यह पहले भाग से उत्तर की तुलना कैसे करता है?P(Xi=2)=P(Xi=4)=1/2Xiμi=3σ2=1mnXi

कुछ सरल विचार प्रयोग उत्तर के उत्तर को प्रदर्शित करते हैं कि मेकपॉन लंबा है। लेकिन यह कैसे परिमाणित किया जा सकता है? मुझे एक उदाहरण पोस्ट करने में खुशी होगी अगर यह या तो (ए) विवादास्पद है या (बी) अस्पष्ट है। इस एक के साथ सफलता के आधार पर, मैं इन समान धारणाओं के तहत एक गतिशील असाइनमेंट योजना के बारे में अनुवर्ती प्रश्न पोस्ट करूंगा। अग्रिम में धन्यवाद!

एक आसान मामले का विश्लेषण: m=1

यदि , तो सभी n कार्य एक ही प्रोसेसर के लिए निर्धारित हैं। मेकपैन एम केवल एक पूर्ण अनुक्रमिक फैशन में एन कार्यों को पूरा करने का समय है । इसलिए, [ एम ]m=1nMn और V a r [ M ]

E[M]=E[X1+X2+...+Xn]=E[X1]+E[X2]+...+E[Xn]=μ+μ+...+μ=nμ
Var[M]=Var[X1+X2+...+Xn]=Var[X1]+Var[X2]+...+Var[Xn]=σ2+σ2+...+σ2=nσ2

ऐसा लगता है कि के लिए सवाल का जवाब देने के लिए इस परिणाम का उपयोग करना संभव हो सकता है ; हम बस के लिए एक अभिव्यक्ति (या नज़दीकी अनुमान) खोजने की जरूरत है अधिकतम ( Y 1 , वाई 2 , , वाई मीटर ) जहां वाई मैं = एक्स मैं nm>1max(Y1,Y2,...,Ym) , के साथ एक यादृच्छिक चरμY=nYi=Xinm+1+Xinm+2+...+Xinm+nmऔरσ 2 Y =nμY=nmμX । क्या यह सही दिशा में जा रहा है?σY2=nmσX2


अच्छा प्रश्न। यदि केवल आज कोई समय सीमा नहीं थी ....
डेव क्लार्क

जवाबों:


8

के रूप में , हम के संदर्भ में इस पर देख सकते हैं कश्मीर और एन के बजाय n और मीटर । मान लीजिए कि टी i वह समय है जब मुझे अपने काम को पूरा करने के लिए i -th प्रोसेसर लगता है ।m=k×nknnmTii

के रूप में बढ़ता है, संभावना है कि टी मैं = 5 कश्मीर (प्रोसेसर केवल सौंपा गया था टी = 5 कार्यों) कुछ के लिए मैं दृष्टिकोण 1 , इसलिए makespan किया जा रहा है के रूप में परिभाषित मीटर एक एक्स ( टी मैं ) , [ एम ] दृष्टिकोण 5 कश्मीरnTi5kT=5i1max(Ti)E[M]5k

दूसरे परिदृश्य के लिए यह इसलिए प्रोसेसर की संख्या में वृद्धि करने से 4-2 विभाजन बेहतर होता है।4k

बारे में क्या है - प्रति प्रोसेसर कार्यों की संख्या में वृद्धि? बढ़ते हुए k का विपरीत प्रभाव होता है, इससे प्रोसेसर के कार्यों के अशुभ होने की संभावना कम होती है। मैं अभी घर जा रहा हूं लेकिन बाद में इस पर वापस आऊंगा। मेरा "कूबड़" यह है कि जैसे-जैसे कश्मीर बढ़ता है, 4-2 विभाजन और 5-1 विभाजन के बीच [ एम ] में अंतर गायब हो जाता है, [ एम ] दोनों के लिए समान हो जाता है। तो मुझे लगता है कि 4-2 हमेशा कुछ विशेष मामलों ( कश्मीर और एन के बहुत छोटे विशिष्ट मूल्यों ) को छोड़कर हमेशा बेहतर होता है , यदि ऐसा है भी।kkkE[M]E[M]kn

इसलिए संक्षेप में:

  • कम विचरण बेहतर है, बाकी सभी समान हैं।
  • जैसे-जैसे प्रोसेसर की संख्या बढ़ती है, कम विचरण अधिक महत्वपूर्ण हो जाता है।
  • जैसे-जैसे प्रति प्रोसेसर कार्यों की संख्या बढ़ती है, कम विचरण कम महत्वपूर्ण हो जाता है।

+1 Excellent intuition, and this helps to clarify my thinking as well. So increasing processor counts tends to increase makespan under a weak scaling assumption; and increasing task counts tends to decrease makespan under a strong scaling assumption (of course it takes longer; I mean the work/makespan ratio improves). These are interesting observations, and they seem true;
Patrick87

the first is justified by the fact that 1(1P(X=5)k)n tends to 1 for fixed k and increasing n; the latter by the fact that Var[X+X]=Var[X]+Var[X]=2σ24σ2=4Var[X]=Var[2X]... so the variance doesn't increase linearly as a function of k. Is that compatible with your thinking (that's how I'm interpreting what you have so far)?
Patrick87

I don't know where the "hunch" came from; it is not consistent with the rest of the heuristic reasoning.
András Salamon

2

I find that heuristic arguments are often quite misleading when considering task scheduling (and closely related problems like bin packing). Things can happen that are counter-intuitive. For such a simple case, it is worthwhile actually doing the probability theory.

Let n=km with k a positive integer. Suppose Tij is the time taken to complete the j-th task given to processor i. This is a random variable with mean μ and variance σ2. The expected makespan in the first case is

E[M]=E[max{j=1kTiji=1,2,,m}].
The sums are all iid with mean kμ and variance kσ2, assuming that Tij are all iid (this is stronger than pairwise independence).

Now to obtain the expectation of a maximum, one either needs more information about the distribution, or one has to settle for distribution-free bounds, such as:

  • Peter J. Downey, Distribution-free bounds on the expectation of the maximum with scheduling applications, Operations Research Letters 9, 189–201, 1990. doi:10.1016/0167-6377(90)90018-Z

which can be applied if the processor-wise sums are iid. This would not necessarily be the case if the underlying times were just pairwise independent. In particular, by Theorem 1 the expected makespan is bounded above by

E[M]kμ+σkn12n1.
Downey also gives a particular distribution achieving this bound, although the distribution changes as n does, and is not exactly natural.

Note that the bound says that the expected makespan can increase as any of the parameters increase: the variance σ2, the number of processors n, or the number of tasks per processor k.

For your second question, the low-variance scenario resulting in a larger makespan seems to be an unlikely outcome of a thought experiment. Let X=maxi=1mXi denote the makespan for the first distribution, and Y=maxi=1mYi for the second (with all other parameters the same). Here Xi and Yi denote the sums of k task durations corresponding to processor i under the two distributions. For all xkμ, independence yields

Pr[Xx]=i=1mPr[Xix]i=1mPr[Yix]=Pr[Yx].
Since most of the mass of the probability distribution of the maximum will be above its mean, E[X] will therefore tend to be larger than E[Y]. This is not a completely rigorous answer, but in short, the second case seems preferable.
हमारी साइट का प्रयोग करके, आप स्वीकार करते हैं कि आपने हमारी Cookie Policy और निजता नीति को पढ़ और समझा लिया है।
Licensed under cc by-sa 3.0 with attribution required.