## 6 Experimental Results  
This section presents and discusses the evaluation of the proposed algorithm. The evaluation is carried out in a uniprocessor case study with periodic and independent callbacks. The proposed solution is compared with three scheduling methods: RMS, GBFS, and greedy LL scheduling algorithms.  
The rate monotonic scheduling (RMS) algorithm was introduced by [PERSON] and [PERSON] in 1973 [21] and is considered a baseline for real-time scheduling. It is a preemptive fixed-priority scheduling algorithm suited for periodic independent and synchronous tasks. The priority of a task is inversely proportional to its period, i.e., the highest priority task will correspond to the task with the shortest period. The algorithm clusters n callbacks on m executors in two steps:  
* In the first step, callbacks that have the same periods are grouped in the same executor with a time complexity of \(\mathcal{O}(mn)\);
* In the second step, a merge sort algorithm is used to define callback priority by assigning high priority to the shortest deadlines with a time complexity of \(\mathcal{O}(m^{2})\).  
In the following, a pseudocode of the RMS algorithm is given (Algorithm 5). The algorithm iterates to regroup elements of S that have the same period while satisfying a linear schedulability test (Schedule() function) defined in [36] and considering the following assumptions:  
Clustering two elements \(\tau_{i}\) and \(\tau_{j}\) in S \(\{tau_{i}\cup\tau_{j}\}\) produces a new element with the following parameters: \(c_{ij}=c_{i}+c_{j}\), \(d_{ij}=min(d_{i},d_{j})\), and \(p_{ij}=p_{i}=p_{j}\).  
```
Input:\(S=\{\tau_{1},\tau_{2},\ldots,\tau_{n}\}\)
1 Functionclustering(\(S\)): \(S^{\prime}=\emptyset\) ; // Sort S in ascending order of priorities first, and deadlines second ; // for\(i=n-1\to 0\)do
2 if\(p_{i}=p_{n}\)then
3\(S^{\prime}=\{S\setminus\{\tau_{i}\}\cup\{\tau_{in}\}\) ; /* Clustering \(p_{i}\) and \(p_{n}\) */
4 ifSchedule\((S^{\prime})\)then ;//Testtheschedulability of the system
5\(S_{min}=S^{\prime}\)
6 else
7\(p_{i}=p_{i}+1\) ; /* Increase the priority of \(p_{i}\) */
8\(S_{min}=S\) ; /* Dot not cluster \(\tau_{i}\) with \(\tau_{n}\) */
9 if\(S_{min}\)not\(\emptyset\)then
10 returnclustering(\(S_{min}\)) ; /* Iterate for the next element */
11 else
12 returnS
```  
**Algorithm 5**Rate monotonic scheduling (RMS) algorithm.  
Note that the number of executors in this case is equal to at least the number of distinct periods in the set of callbacks. In industry, the system designer still uses the algorithm for embedded critical systems, as it guarantees upper bounds to the response time and is simple to implement. However, it is generally too conservative (pessimiste) for practical use and does not optimize the use of system resources [37].  
The GBFS algorithm developed by [17] uses the greedy heuristic approach to gather the largest number of callbacks to the same executor. Priorities are assigned by deadline, i.e., the callbacks with the shortest deadline have the highest priority. The time complexity of the algorithm is of \(\mathcal{O}(n^{4})\), where n is the initial number of callbacks to be clustered (Algorithm 6).  
For each clustering iteration, the algorithm uses a sufficient schedulability test and a cost function to select the best result in each clustering iteration (Equation (13)).  
\[cost(S)=\sum_{k=0}^{|S|}\frac{c_{k}}{d_{k}} \tag{13}\]  
The third algorithm used for comparison is the least loaded (LL) heuristic approach, used in [18]. The approach applies a deadline test schedulability similar to the one used in this paper along with a heuristic approach of least load to design the cost function, and defines the sequencing order of callbacks inside the executor with a complexity of \(\mathcal{O}(n^{2})\).