# Affinity-Based Task Scheduling on Heterogeneous Multicore Systems Using CBS and QBICTM
## 3 Results  
In this section, we evaluate the performance of our proposed methodology. The chunk-based scheduling technique and quantum based intra core task migration scheduler are applied to two programs, namely, a factorial program and a real-life working example (ingredients ratio for baking a cake). For the factorial program we calculated execution time for an individual number, as well as for a process (a range of numbers). Real-life working example is a linear program for baking a cake with four ingredients, which are flour, butter, eggs and sugar. The scenario for the execution of a program is as follows  
* All the ingredients weigh exactly 700 g in total. * Amount of butter was half that of sugar. * Combined weight of flour and eggs was at most 450 g.
* Weight of eggs and butter combined was at most 300 g.
* The combined weight of eggs and butter was at most that of flour plus sugar. The program calculates the weight of each individual ingredient after processing multiple tasks, which have read-write our write-read dependencies. The characteristics of the system on which we have performed experiments are given in Table 2.  
We have applied Bayesian data analysis on a factorial program. The input values for the factorial program contain different ranges. We have taken different parameter values based on assumptions for, e.g., if there are 100 tasks to be processed, we assumed 30 of \begin{table}
\begin{tabular}{c c} \hline \hline
**Technology** & **Specification** \\ \hline Processor & Intel Core i5-7200 U @ 2.70 GHZ \\ Operating System & LINUX, Windows 10 Pro \\ Sockets & 1 \\  & L1: 128 KB \\ Cache Levels & L2: 512 KB \\  & L3: 3.0 MB \\ RAM & 8 GB DDR4 \\ Core Count & 4 logical, 2 Physical \\ \hline \hline \end{tabular}
\end{table} 
Table 2: System specifications. those are dependent while 70 tasks have no dependencies. We find the probability based on the task dependencies given they are communicating or synchronized or both out of those 30 dependent tasks based on the assumptions. The posterior data generated as an output by the Bayesian model show different ranges, as shown in Figure 5. We set the non-informative prior for task dependency as uniform where the dependency ratio of the tasks can be any value between 0 and 1. There might be 100% task dependency or it can also be 0%. The different parameters are given as an input to the Bayesian generative model. The total of 100 iterations were run because we took each value in the range of 1 to 100 as an input parameter. Figure 5: Prior and posterior task dependencies based on different parameter values. (**a**) Non-informative uniform prior when parameter value is 20; (**b**) posterior tasks dependency for parameter value 20; (**c**) non-informative uniform prior when parameter value is 60; (**d**) posterior tasks dependency for parameter value 60; (**e**) non-informative uniform prior when parameter value is 80; (**f**) posterior tasks dependency for parameter value 80. Table 3 shows the results for six different parameter values. Different parameter values are given as an input to the Bayesian generative model along with non-informative uniform priors. The Bayesian generative model takes different parameter values as inputs and calculates the probability of the task's dependency based on the parameter value. The dependent tasks based on the communication or synchronization are listed together by the generative model, which are later grouped together in single or multiple clusters. Once the dependent tasks are listed separately, we make the clusters of similar and independent tasks. The number of clusters equals the number of cores in a heterogeneous multicore architecture. Each output generated by the Bayesian analysis model for different parameters is listed and clusters are made one by one. Now, the mapping of the clusters onto the cores of the multicore architecture is initiated. Two different techniques are applied to ensure maximum load balancing on a heterogeneous system.