Applying the QMSA in finding the best scenario for every new incoming task requires computing the maximum number of steps needed to run the BSA, i.e. the parameter π.
It is worth noting that integrating the RDM model in the framework of a quantum system- level is not straightforward and may need a careful configuration of its parameters.
The maximum number of steps π needed to run the BSA embedded in the QMSA depends on two parameters which are the step size of the search space that is according to the proposed RDM model is the absolute value of the minimum nonzero difference between variances of any two scenarios πΌ as presented in Eq. (3.3), where ππ2 replaces ππ in Eq. (2.19) and the size of the region of varianceβs values βπ2 = π2πππ₯ β π2πππ, the expression of T is illustrated in Eq. (3.4),
πΌ = min
β π,π|(ππ2 β ππ2)| , (3.3)
π = π2πππ₯
β
π2ππππΌ
.
(3.4)οΆ πΌ - The minimum distance between variances of two scenarios depends on many parameters such as the task memory requirement, processing time, the workload, the arrival time distribution of the task, the number of the computing units, and their theoretical capacities. An illustrative example of πΌ is presented in Figure 3.3.
οΆ βπ2 - The possible region of the variance is bounded by 0 and 1.
51
The configuration of T is formulated as finding the minimum distance between variances of two scenarios according to Eq. (3.3). To that end, our key focus is to set up the πΌ.
Let π₯π be the total load of the kth computing unit
π₯π = β πππ
πΊ
π=1
ππ. (3.5)
Assume ππ be the relative load of the kth computing unit, ππ = βπΊπ=1πππππ
π π . (3.6)
Figure 3.3: The horizontal axis presents all the possible deployment scenarios, while the vertical axis presents the borders of the variance function (different results), each possible scenario corresponds to a variance value. Computing the value of πΌ requires
selecting the minimum distance between variances of two deployment scenarios π and π.
Let πΜ refer to the average relative load of the kth computing unit,
πΜ = 1
πΎ β ππ
πΎ
π=1
.
(3.7)52
Let s denote the class of the new task, the memory requirement of the new task is expressed by ππ while the ith computing unit indicates the destination of the new incoming task. It is interesting to note that selecting the suitable computing unit for the new incoming task requires updating the value of the ith computing unit, which implies that the relative load of the ith computing unit ππ=π
π=π
π,π and the relative load of the remaining computing units ππβ π can be expressed respectively as
ππ=π
π=π
π,π = ππ +ππ
π π , (3.8)
βπ β {1, β¦ , πΎ}\{π} ππβ π = ππ. (3.9) The average of the relative load of the system when the ith computing unit receives the new incoming task from class π is given as follows,
ππ=π
Μ Μ Μ Μ Μ = 1 πΎβ πππ
πΎ
πβ π
+ 1 πΎ ππ=π
π=π
π,π . (3.10)
One can verify that
ππ=π
Μ Μ Μ Μ Μ = πΜ + 1 πΎ
ππ
π π . (3.11)
One can write the variance of the relative load of the system when the ith computing unit receives the new incoming task π as
ππ2 = 1
πΎβ(πΜ Μ Μ Μ Μ β ππ=π ππ)2
πΎ
π=1
= 1
πΎβ(πΜ Μ Μ Μ Μ β ππ=π π)2+
πΎ
πβ π
1
πΎ[πΜ Μ Μ Μ Μ β [ππ=π π +ππ π π ] ]
2
.
(3.12)
It is reasonable to assume that the number of computing units K is very large, one obtains
53 ππ2 = 1
πΎβ (1 πΎ
ππ π π β ππ)
2
+
πΎ
πβ π
1 πΎ[1
πΎ ππ
π π β [ππ +ππ π π ] ]
2
= 1
πΎβ(βππ)2+
πΎ
πβ π
1 πΎ[(1
πΎβ 1)ππ π π β ππ ]
2
= 1
πΎβ ππ2+
πΎ
πβ π
1 πΎ (ππ
π π )
2
+ 1
πΎ2ππ(ππ π π ) + 1
πΎ ππ2
= 1
πΎβ ππ2
πΎ
π=1
+ 1 πΎ ((ππ
π π )
2
+ 2ππ(ππ π π )).
(3.13)
Finally, The difference between two dissimilar relative load variances (which is needed to calculate πΌ) can be formulated as
ππ2β ππ2 = 1 πΎ[(ππ
π π )
2
β (ππ π π)
2
+ 2ππ (βπΊπ=1πππππ
π π ββπΊπ=1πππππ
π π )]. (3.14)
To compute the local minimum πΌ, one can verify that |(ππ2 β ππ2)| has to be evaluated at most πΎ(πΎ β 1)/2 times. This means that for πΎ > 3, calculating πΌ requires more evaluations to find the minimum of ππ2. Here we propose another alternative. Instead, we determine the global minimum of πΌ over all the possible configurations in advance, before the RDM starts operation and this global πΌ is used at each decision.
Obviously, this is an engineering tradeoff. On one hand, the global πΌ will be the lover bound of the actual πΌ. Therefore, the BSA will require more steps (but due to the nature of the log function this will not cause a real increase in computation complexity). On the other hand, we do not waste time during the real-time decisions by computing the local Ξ±!
As it is shown in Eq. (3.14), the value of ππ2β ππ2 is mainly affected by the relative load of the ith and jth computing units, and more precisely with the values of the variables ππ1, ππ2,β¦, πππΊ, and ππ1, ππ2,β¦, πππΊ. Unfortunately, we cannot investigate the nonzero minimum value of
|(ππ2β ππ2)| because the variables ππ1, ππ2,β¦, πππΊ, ππ1, ππ2,β¦, πππΊ have a linear combination in
54
2G dimensional space. For this reason, we replace the absolute value function in Eq. (3.3) with the square of the expression of ππ2β ππ2, as it is obtained as follows,
π(π, π) = (ππ2β ππ2)2
= ( 1 πΎ[(ππ
π π )
2
β (ππ π π )
2
+ 2ππ (βπΊπ=1πππππ
π π2 ββπΊπ=1πππππ π π2 )])
2
. (3.15)
To find the smallest non-zero difference between variances of two different assignments, it is enough to investigate π(π, π) = 0. It is important to mention that for any distribution, the difference between variances of two different scenarios depends only on the ππ‘β and ππ‘β computing units, we note that the value of πΌ is not trivial, i.e. non-zero and ππ2 β ππ2. On the other hand, it is noticeable that (ππ2β ππ2)2 β₯ 0. Therefore it is enough to investigate (ππ2β ππ2)2 = 0, this expression derives an important property of the minimum points (the variables ππ1, ππ2,β¦, πππΊ, and ππ1, ππ2,β¦, πππΊ are linearly dependent), i.e. the minimum places of the function π = (ππ2β ππ2)2 are situated in a hyperplane.
In the general case, to determine the desired πΌ, it is needed to fulfill a number of restrictions determined by choosing the suitable range of ππ1, ππ2,β¦, πππΊ, and ππ1, ππ2,β¦, πππΊ. The function f is continuous, however, from the RDM point of view ππ1, ππ2,β¦, πππΊ, and ππ1, ππ2,β¦, πππΊ must be integer numbers. The first step is to assign integer numbers different than zero to all the variables except πππ (or πππ), then compute the value of πππ (or πππ), here, at this stage, there are two options whether the πππ (or πππ) value is an integer or not.
οΆ 1st case: if π΅ππ (or π΅ππ) is an integer
The minimum distance between the variances of two scenarios πΌ equals zero and the values of ππ1, ππ2,β¦, πππΊ, and ππ1, ππ2,β¦, πππΊ are not appropriate solutions for πΌ, so, in this case, the value of πππ (or πππ) can be modified, by increasing or decreasing one of them, i.e. assigning the value of πππ+ 1 or πππβ 1 to πππ, (or assigning the value of πππ + 1 or πππ β 1 to πππ). The most important thing is to choose only one assignment which results in the minimum value of πΌ, let us investigate the value of f when we assign the value πππ+ 1 or πππ β 1 to πππ, (or assigning the
55
value of πππ+ 1 or πππβ 1 to πππ). Using the result stated in Eq. 3.12, letβs prove that for a given task π = π, ππππ+1 = ππππβ1.
In the case πππ is an integer where π = π, and considering the claim (ππ2β ππ2)2 = 0. The expression of ππππ+1 is given as follows,
ππππ+1 = ( 1 πΎ[(ππ
π π )
2
β (ππ π π)
2
+ 2ππ (βπΊπβ ππππππ
π π2 +(πππ+ 1)ππ
π π2 ββπΊπ=1πππππ π π2 )])
2
ππππ+1 = ( 1 πΎ[(ππ
π π )
2
β (ππ π π)
2
+ 2ππ (βπΊπ=1πππππ π π2 +ππ
π π2ββπΊπ=1πππππ π π2 )])
2
= (1 πΎ
2ππ ππ π π2 )
2
.
(3.16)
On the other hand, one can verify that ππππβ1 can be expressed as
ππππβ1 = ( 1 πΎ[(ππ
π π )
2
β (ππ π π)
2
+ 2ππ (βπΊπβ ππππππ
π π2 +(πππβ 1)ππ
π π2 ββπΊπ=1πππππ π π2 )])
2
ππππβ1 = ( 1 πΎ[(ππ
π π )
2
β (ππ π π)
2
+ 2ππ (βπΊπ=1πππππ π π2 βππ
π π2ββπΊπ=1πππππ π π2 )])
2
= (β1 πΎ
2ππ ππ π π2 )
2
= (1 πΎ
2ππ ππ π π2 )
2
.
(3.17)
Based on the result of Eq. (3.16) and Eq. (3.17), we conclude that,
ππππ+1 = ππππβ1. (3.18)
Eq. (3.18) states that the cross-section of the hyperplane is symmetric on the minimum places of (ππ2β ππ2)2 in 2G dimensional space.
οΆ 2nd case: if π΅ππ (or π΅ππ) is not an integer
56
Since f is a monotonous function, so, the nearest integer can be assigned to πππ (or πππ), in this case, the parameter πΌ does not equal zero.
To illustrate the location of the solutions of the (ππ2β ππ2)2 = 0, in case of handling only one task type generator. A simulation example is built to determine the location of the minimum places of πΌ. Letβs consider the following parameters, one task type generator is assumed, the memory requirement of the task is denoted by π, in this case, the Eq. (3.15) will be rewritten as Eq. (3.19), a detailed demonstration is presented in Appendix,
πππ(ππ2β ππ2)2 β πππ (1 πΎ [(π
π π)
2
(1 + 2ππ) β (π π π)
2
(1 + 2ππ)])
2
. (3.19)
where ππ and ππ are the number of tasks respectively in the ππ‘β unit and the ππ‘β unit. For the simulation environment, the following setup is taken into consideration, π = 1, π π2 = 10 and π π2 = 10, the range of ππ and ππ is between -30 and 30. As reported in Figure 3.4 and Figure 3.5 the solution of the minimum distance between two different scenarios is situated in a line, which means that all the appropriate solutions are situated in the middle of the dark blue region, the area within the red border.
Figure 3.4: The shape of the function f with respect to ππ and ππ, in case, setting up the following parameters π = 1, π π2= 10, π π2= 10.
57
Figure 3.5: The contour of the shape of the function f with respect to ππ and ππ in case setting up the following parameters π = 1, π π2= 10, π π2= 10.