Next Article in Journal
Evaluation of Fracturing Effect of Tight Reservoirs Based on Deep Learning
Next Article in Special Issue
IoT-Based Wireless System for Gait Kinetics Monitoring in Multi-Device Therapeutic Interventions
Previous Article in Journal
Highly Tunable Light Absorber Based on Topological Interface Mode Excitation of Optical Tamm State
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Enhanced Harmonic Partitioned Scheduling of Periodic Real-Time Tasks Based on Slack Analysis

1
School of Computer Science and Technology, Dalian University of Technology, Dalian 116024, China
2
Key Laboratory of Social Computing and Cognitive Intelligence, Ministry of Education, Dalian 116024, China
3
School of Computer Science and Technology, Xinjiang Normal University, Urumqi 830054, China
4
Graduate School of Education, Dalian University of Technology, Dalian 116024, China
*
Author to whom correspondence should be addressed.
Sensors 2024, 24(17), 5773; https://doi.org/10.3390/s24175773
Submission received: 1 August 2024 / Revised: 31 August 2024 / Accepted: 4 September 2024 / Published: 5 September 2024
(This article belongs to the Special Issue Intelligent Wireless Sensor Networks for IoT Applications)

Abstract

:
The adoption of multiprocessor platforms is growing commonplace in Internet of Things (IoT) applications to handle large volumes of sensor data while maintaining real-time performance at a reasonable cost and with low power consumption. Partitioned scheduling is a competitive approach to ensure the temporal constraints of real-time sensor data processing tasks on multiprocessor platforms. However, the problem of partitioning real-time sensor data processing tasks to individual processors is strongly NP -hard, making it crucial to develop efficient partitioning heuristics to achieve high real-time performance. This paper presents an enhanced harmonic partitioned multiprocessor scheduling method for periodic real-time sensor data processing tasks to improve system utilization over the state of the art. Specifically, we introduce a general harmonic index to effectively quantify the harmonicity of a periodic real-time task set. This index is derived by analyzing the variance between the worst-case slack time and the best-case slack time for the lowest-priority task in the task set. Leveraging this harmonic index, we propose two efficient partitioned scheduling methods to optimize the system utilization via strategically allocating the workload among processors by leveraging the task harmonic relationship. Experiments with randomly synthesized task sets demonstrate that our methods significantly surpass existing approaches in terms of schedulability.

1. Introduction

In Internet of Things (IoT) applications, sensors are critical components that continuously monitor and collect data from the environment. Generally, the sensor data need to be processed in real time to enable timely responses and actions [1,2,3,4]. With the rapid advancement in multiprocessor technology, multiprocessor platforms have already been widely adopted in IoT applications to handle large volumes of sensor data while maintaining real-time performance at a reasonable cost and with low power consumption [5,6,7,8]. Conversely, partitioned scheduling statically assigns tasks to specific processors, where they execute without migration.In comparison to global scheduling, partitioned scheduling can effectively alleviate the unpredictability of system run-time behaviors through safe isolation between different processors [9]. In most cases, the partitioning approach is generally considered to be the most appropriate solution owing to its simplicity and efficiency when the task set is predetermined and known in advance. Consequently, partitioned scheduling has gained widespread adoption and support in a variety of commercial real-time operating systems for IoT applications [10].
Unfortunately, the task allocation problem in partitioned scheduling is similar to the bin-packing problem, which is recognized as strongly NP -hard [11]. To address the task allocation problem in partitioned scheduling, a rich literature has been developed, and a comprehensive survey can be found in [12,13]. Early research in partitioned multiprocessor scheduling often relied on combining different bin-packing heuristics with task ordering methods for the task allocation [12,13]. However, these approaches disregard the potential impact of some implicit relations among tasks on the schedulability of tasks assigned to a processor [14]. More recently, there has been an increased focus on optimizing processor utilization by exploiting the task period relationship during task partitioning. Much work in this direction is motivated by the observation that the utilization bound of a task set tends to rise as the task periods exhibit greater harmonicity [15]. To optimize the schedulability of the system with periodic real-time tasks by leveraging the task period harmonic relationships, Wang et al. [14] proposed two harmonic-aware partitioned approaches to group tasks with harmonic periods on the same processor. For probabilistic real-time systems, Wang et al. [16] presented four harmonic metrics and a harmonicity-aware partitioning method to optimize system utilization. Their main idea was to assign harmonic tasks to a single processor to enhance the system usage by exploring the harmonic relationship among tasks. Nonetheless, its performance deteriorates when the system includes some heavy-utilization tasks. The main cause of this is the lack of consideration for workload characteristics during task allocation, resulting in a fragmentation issue, where certain tasks cannot be assigned despite the overall processor capacity being relatively high [17]. To address this problem, Ren et al. [17] proposed a workload-aware harmonic partitioned scheduling method for probabilistic multiprocessor real-time systems. For constrained-deadline real-time tasks, Wang et al. [18] introduced two harmonic scheduling methods, GIM and HCM. However, neither GIM nor HCM adequately incorporate the impact of harmonicity and workload characteristic on the task allocation performance. To address this problem, Ren et al. [19] further refined this approach by designing grouping metrics that consider both harmonicity and workload characteristics. These investigations demonstrate that system schedulability can be substantially enhanced compared to traditional bin-packing approaches when task harmonic relationships are effectively utilized. However, these studies quantify the task set harmonicity by measuring the “distance” from an associated harmonic task set with respect to change in density or utilization, and they construct a harmonic counterpart of a task set by scaling periods or deadlines. This harmonicity metric is too tight to effectively quantify the harmonicity of some task sets, limiting the potential improvements in schedulability for some task sets using existing harmonic-partitioned scheduling methods.
In this paper, we propose a more general harmonicity characterization approach based on the slack variation to address the limitations of the existing methods mentioned above. In particular, we propose an exact analysis method for the worst-case slack time and the best-case slack time to derive the harmonic index based on slack variation. With the proposed harmonic index, we present two enhanced harmonic task partitioning algorithms. The first algorithm, named EHAP-SV, focuses on improving the system utilization by leveraging the task harmonic relationships. To tackle the “fragmentation” issue and further enhance the system schedulability, we also propose a workload-aware harmonic partitioning algorithm called WAHP-SV, incorporating both harmonicity and workload characteristics into the scheduling framework.
Contributions. The primary contributions of this work are as follows:
  • A more general harmonic index based on slack variation to effectively quantify the harmonicity degree of a periodic real-time task set;
  • An exact analysis method for the worst-case slack time and the best-case slack time to derive the slack variation-based harmonic index;
  • An enhanced harmonic task partitioning scheme to optimize the system utilization by leveraging the harmonic relationships to allocate harmonic tasks to one processor;
  • A workload-aware harmonic task partitioning scheme by designing a metric integrating the exploration of harmonic relationships and workload characteristics to alleviate the “fragmentation” problem in the pure harmonic task partitioning method.
Experimental evaluation on randomly synthesized task systems demonstrates that our methods surpass existing partitioned scheduling approaches in terms of schedulability.
The remaining sections are structured as follows. Section 2 provides the system model and problem definition. In Section 3, we present the harmonic index based on slack variation and give its calculation method based on slack time analysis. Section 4 presents a detailed description of our proposed enhanced harmonic partitioned scheduling schemes. The experimental evaluation is given in Section 5, and we conclude the paper in Section 6.

2. System Model and Problem Definition

Before presenting the detailed system model, we summarize the major notations used in this paper in Table 1.
Sensors in IoT systems generally generate data at various rates to constantly track and measure some properties, and the processing tasks often have different periods and deadlines. In this paper, we focus on a real-time system in IoT with n independent periodic real-time sensor data processing tasks, represented by Γ = { τ 1 , …, τ n }. These tasks are preemptively scheduled on a multiprocessor platform comprising m identical processors with unit-capacity, indicated as Π = { π 1 , …, π m }, according to the rate monotonic (RM) policy. We assume a discrete notion of real time t = x θ , x 0 , where θ is both the unit time and the smallest unit of preemption, and all timing values are specified as non-negative integers. For each task τ i Γ , described by a triple τ i = ( C i , T i , D i ) , where:
  • C i represents the worst-case execution time (WCET) of τ i ;
  • T i denotes the inter-arrival time (period) of τ i ;
  • D i represents the relative deadline of τ i .
All tasks are considered to be implicit-deadline real-time tasks (i.e., D i = T i ). All tasks are assumed to be initially released simultaneously at time t = 0 . The job of τ i is indicated by J i , k , with its release time represented by r i , k . The WCETs of all tasks are assumed to be strictly positive. The worst-case response time (WCRT) of a task τ i , represented by R i , measures the maximum interval between a job’s release and its completion, taking into account potential interference from other tasks. A task set Γ is considered schedulable if the WCRT of every task τ i Γ does not exceed the deadline. The hyperperiod of the task set Γ is indicated by H Γ , which is the least common multiple of periods of all tasks in Γ .
We characterize the workload of tasks by using the task utilization.
Definition 1. 
The  utilization  of a real-time task τ i = ( C i , T i , D i ) , denoted as U i , is expressed as
U i = C i T i .
Definition 2. 
The  total utilization  of a real-time task set Γ, indicated as U Γ , is expressed as
U Γ = τ i Γ U i .
Definition 3. 
Given a set of n independent periodic real-time sets Γ = { τ 1 , …, τ n } and m identical processors Π = { π 1 , …, π m }, the goal of the  partitioned multiprocessor scheduling problem  is to assign each task in Γ to exactly one processor in Π such that all tasks meet their deadlines while minimizing the overall number of processors utilized.
Note that the task allocation problem in partitioned scheduling is similar to the bin-packing problem, which is recognized as strongly NP -hard [11].
Definition 4 
([11]). Given a bin capacity V and a set of n items x 1 , …, x n with sizes a 1 , …, a n , the goal of the bin-packing optimization problem is to assign each item to a bin such that the number of bins is minimized and no bin exceeds its capacity V.
Theorem 1. 
Given a set of n independent periodic real-time sets Γ = { τ 1 , …, τ n } and m identical processors Π = { π 1 , …, π m }, the partitioned multiprocessor scheduling problem is NP -hard.
Proof. 
To prove that the partitioned multiprocessor scheduling problem is NP -hard, we reduce an instance of the bin-packing problem to an instance of the partitioned multiprocessor scheduling problem.
For each item x i in the bin-packing problem, we create a corresponding task τ i with WCET C i = a i . Let us consider the period and deadline of each task τ i to be bin capacity V (i.e., T i = D i = V ). This implies that each task must complete its execution within one period, which corresponds to the capacity of the bin. Each processor in the scheduling problem is considered as a bin in the bin-packing problem. Each processor has a capacity in terms of the total execution time it can handle within the period. Thus, if we can find a valid partitioned multiprocessor schedule for the tasks such that all tasks meet their deadlines, then this corresponds to a valid bin-packing solution, where the number of processors used is equivalent to the number of bins used.
According to [11], the bin-packing problem is NP -hard. Since we can reduce any instance of the bin-packing problem to an instance of the partitioned multiprocessor scheduling problem in polynomial time, and a solution to the scheduling problem would provide a solution to the bin-packing problem, it follows that the partitioned multiprocessor scheduling problem is also NP -hard.    □
To improve the performance of the partitioned scheduling via the harmonic relationship exploration based on the effective harmonicity quantification, we introduce a harmonic index based on slack variation to measure the harmonic characteristic among tasks. In the following, we provide some definitions of slack time.
Definition 5. 
For a job J i , k of a real-time task τ i , its  slack time, indicated as S i , k , is defined as the amount of idle time during the interval [ r i , k , r i , k + T i ) when all jobs of all tasks always experience worst-case execution times.
Definition 6. 
The  worst-case slack time  of a real-time task τ i , indicated as S i W , is defined as
S i W = inf k S i , k .
Definition 7. 
The  best-case slack time  of a real-time task τ i , indicated as S i B , is expressed as
S i B = sup k S i , k .
The primary aim of this research is to develop an efficient task partitioning method, ensuring that each processor’s assigned set of tasks is schedulable while minimizing the overall number of processors utilized. We analyze the drawbacks of the current harmonic index for harmonicity-aware partitioning schemes with an example, and introduce a novel harmonic index based on slack variation to guide the task partition. With the proposed harmonic index, we devise two efficient partitioned scheduling schemes to enhance system utilization through efficiently leveraging the task harmonic relationship.

3. Harmonicity Quantification Based on Slack Analysis

To enhance the performance of the partitioned scheduling via the harmonic relationship exploration based on the effective harmonicity quantification, we propose a slack variation-based harmonic index to guide the task partition. In this section, we first illustrate the motivation behind the slack variation-based harmonic index through an example to highlight the drawbacks of the utilization change-based harmonic index. We then provide a comprehensive explanation of our harmonic index based on slack variation. Additionally, we also present an exact analysis method to determine the worst-case and best-case slack times, which are utilized to calculate the harmonic index based on slack variation.

3.1. Motivations

In order to optimize task partition by exploring harmonic relationships, it is crucial to quantify the task set harmonicity degree, as not all tasks are strictly harmonic. Fan et  al. [14] presented a task set harmonic index through measuring the “distance” between a task set and the corresponding harmonic task set with regard to the total utilization change. However, such a harmonic index is too tight to effectively quantify the degree of harmonic for certain task sets, thereby limiting the potential improvement in the schedulability through the harmonic relationship exploration with this index. Here, we first discuss the shortcomings of the existing harmonic index, and then, introduce our proposed harmonic index based on slack variation.
Definition 8 
([14]). For a task set Γ = { τ 1 , , τ n } , where τ i = ( C i , T i , D i ) , we define a new task set Γ = { τ 1 , , τ n } , where τ i = ( C i , T i , D i ) , T i T i , D i = T i , and for any two tasks τ i and τ j , if T i < T j , then T j is an integer multiple of T i . This new task set Γ is referred to as a sub-harmonic task set of task set Γ.
Definition 9 
([14]). Given a sub-harmonic task set Γ of task set Γ, we define task set Γ as the primary harmonic task set of task set Γ when there is no other sub-harmonic task set Γ , such that T i T i for all i where 1 i n .
According to [15], we can derive Theorem 2.
Theorem 2 
([15]). Given a primary harmonic task set Γ of task set Γ, Γ is schedulable on a uniprocessor under the RM policy when U Γ 1 .
Definition 10 
([14]). For a task set Γ, let G ( Γ ) be all primary harmonic task sets of task set Γ. The utilization change-based harmonic index of task set Γ, indicated as H uc ( Γ ) , is expressed as
H uc ( Γ ) = min Γ G ( Γ ) U Γ U Γ .
From Equation (5), we can observe that H uc is characterized as the minimum “distance” between a task set and its primary harmonic task sets with regard to the change in total utilization. We can also see that a low value of H uc indicates a high harmonic relationship, and a task set Γ is strictly “harmonic” exactly when H uc ( Γ ) = 0 . For primary harmonic task sets, they can be obtained with the Sr or DCT algorithms in [15]. However, the original intention of the primary harmonic task set is to improve the schedulability analysis of the RM scheduling strategy, and it considers a task set to be strictly harmonic exactly when every pair of tasks in the task set are strictly harmonic. This leads to inaccurate quantification of the harmonicity of some task sets from the perspective of system resource utilization, and we illustrate this issue with an example.
Example 1. 
Let us consider a task set Γ = { τ 1 , τ 2 , τ 3 } , as given in Table 2, executed on a uniprocessor under the RM scheduling policy. Here, T i represents the period of the task corresponding to task τ i in a primary harmonic task set Γ of Γ, ensuring that U Γ U Γ is minimized. We can find that U Γ = 1 / 2 + 1 / 3 + 1 / 6 = 1 and U Γ = 2 / 3 + 1 / 3 + 1 / 6 = 7 / 6 , and thus, H uc ( Γ ) = 7 / 6 1 = 1 / 6 . Therefore, Γ is not strictly "harmonic" based on the definition of the harmonic index H uc . However, according to the simulation of the synchronous arrival sequence (SAS) for all tasks in Γ in Figure 1, it is evident that Γ is schedulable. Moreover, the utilization of Γ is 1, and thus, Γ can be regarded as strictly “harmonic” from the perspective of system resource utilization because the maximum utilization is achieved. Therefore, the harmonic index H uc is not able to effectively quantify the harmonicity degree of Γ due to its tight restriction. This leads to the harmonic partitioned scheduling method based on H uc not offering good performance for some task sets (see Example 3). In the following section, we give a more general harmonic index based on slack variation, which can effectively quantify the harmonicity of task set Γ (see Example 2).

3.2. Harmonic Index Based on Slack Variation

As indicated in Example 1, the utilization change-based harmonic index cannot effectively quantify the harmonicity of some task sets from the perspective of system resource utilization. Now, we first discuss the property of the schedulable task set that can achieve maximum utilization; thus, we can shed some light on the design of our proposed harmonic index based on slack variation.
Lemma 1. 
Consider a schedulable task set Γ = { τ 1 , , τ n } with U Γ = 1 on a uniprocessor under the rate monotonic (RM) policy. Here, tasks in Γ are sorted in decreasing priority and their WCETs are greater than 0. Then, the WCRT R n of τ n equals its period T n , that is, R n = T n .
Proof. 
Since tasks in task set Γ are ordered in decreasing priority, task τ n has the lowest priority and T 1 T 2 T n . Since U Γ = 1 , we can obtain
C 1 T 1 + C 2 T 2 + + C n T n = 1 .
Thus, we can obtain
1 i n 1 T n C i T i + C n = T n .
Based on [20], the WCRT R n satisfies the following equation:
R n = 1 i n 1 R n T i C i + C n .
Because the task set Γ is schedulable, we have R n = T n δ , where δ 0 . Therefore, with Equations (7) and (8), we have
T n δ = 1 i n 1 T n δ T i C i + C n 1 i n 1 T n δ T i C i + C n = T n δ 1 i n 1 C i T i .
By Equation (9), we have
δ 1 1 i n 1 C i T i 0 .
With Equations (6) and (10), we have
δ C n T n 0 .
Since the WCETs of all tasks are greater than 0 and δ 0 , by Equation (11), we have δ = 0 . Therefore, the worst-case response time R n is equal to its period T n .    □
Based on Lemma 1, for a schedulable task set Γ = { τ 1 , , τ n } with U Γ = 1 on a uniprocessor under the RM policy, we can obtain the relationship between the period of task τ n and the periods of tasks with higher priorities than task τ n (i.e., Lemma 2).
Lemma 2. 
Consider a schedulable task set Γ = { τ 1 , , τ n } with U Γ = 1 on a uniprocessor under the rate monotonic (RM) policy. Here, tasks in Γ are sorted in descending priority and their WCETs are greater than 0. Then, the period T n of task τ n is a common multiple of periods of all higher-priority tasks τ i for 1 i n 1 .
Proof. 
By Lemma 1 and Equation (8), we have
T n = 1 i n 1 T n T i C i + C n .
By Equations (7) and (12), we have
1 i n 1 T n T i T n T i C i = 0 .
Since the WCETs of all tasks are greater than 0, by Equation (13), we have T n / T i = T n / T i for each task τ i . Therefore, the period T n of task τ n is a common multiple of periods of all higher-priority tasks τ i for 1 i n 1 .   □
Theorem 3. 
Consider a schedulable task set Γ = { τ 1 , , τ n } with U Γ = 1 on a uniprocessor under the rate monotonic (RM) policy. Here, tasks in Γ are sorted in decreasing priority and their WCETs are greater than 0. The worst-case slack time S n W of τ n equals its best-case slack time S n B , i.e., S n W = S n S .
Proof. 
According to Lemma 2, the period T n of task τ n is a common multiple of periods of all higher-priority tasks τ i ( 1 i n 1 ). Moreover, because task τ n is the lowest-priority task in Γ , its period T n equals the hyperperiod of Γ (i.e., T n = H Γ ). Since all tasks in Γ are initially released at the same time, each job J n , k of task τ n will be released concurrently with a job of every higher-priority task τ i ( 1 i n 1 ). Therefore, all jobs of task τ n have the same slack times, and thus, the worst-case slack time S n W of τ n equals its best-case slack time S n B .   □
From Theorem 3, we can find that for a schedulable task set under RM scheduling policy that achieves maximum utilization (i.e., 1), all jobs of the lowest-priority task share the same slack times (i.e., the worst-case slack time is equal to the best-case slack time). On the basis of this observation, we introduce the harmonic index based on the slack variation as follows.
Definition 11. 
Consider a schedulable task set Γ = { τ 1 , , τ n } on a uniprocessor under the rate monotonic (RM) policy. Here, tasks in Γ are sorted in decreasing priority. The  slack variation-based harmonic index  of the task set Γ, indicated as H slack ( Γ ) , is expressed as
H slack ( Γ ) = S n B S n W T n .
where S n B and S n W are the best-case and worst-case slack times of τ n , respectively.
A low value of H slack implies a high harmonicity degree, and the task set Γ is “harmonic” if H slack ( Γ ) = 0 . When H slack ( Γ ) > 0 , the index H slack ( Γ ) can be viewed as a measure of processor resource waste when the lowest-priority task achieves the largest schedulable WCET, since the worst-case situation (i.e., the case where a job of the task experiences its WCET) should be considered for the schedulability analysis. Therefore, a higher utilization can be attained by assigning tasks with a lower slack variation-based harmonic index to the same processor to balance the slack time.
Example 2. 
Let us consider task set Γ as depicted in Table 2 again. From Figure 1, we can find that the Γ is schedulable on a uniprocessor, and S 3 W = S 3 B = 1 for the lowest-priority task τ 3 . Thus, we can obtain H slack ( Γ ) = 0 . Therefore, Γ is strictly harmonic according to the slack variation-based harmonic index. Consider the sub-task set Γ sub = { τ 1 , τ 2 } Γ . For the lowest-priority task τ 2 in Γ sub , S 2 W = 1 and S 2 B = 2 , and thus, H slack ( Γ sub ) = ( 2 1 ) / 3 = 1 / 3 > 0 . Therefore, the task set Γ sub is not harmonic according to the harmonic index based on slack variation. Note that for the task set Γ sub , task τ 2 achieves the largest schedulable WCET even though there is still some slack for some jobs (e.g., jobs J 2 , 2 and J 2 , 4 ), since the worst-case scenarios (i.e., jobs J 2 , 1 and J 2 , 3 ) should be considered for the schedulability analysis.
Corollary 1. 
Consider a schedulable task set Γ = { τ 1 , , τ n } on a uniprocessor under the rate monotonic (RM) policy, where the WCETs of all tasks are greater than 0. If the utilization change-based harmonic index H uc ( Γ ) = 0 , then the slack variation-based harmonic index H slack ( Γ ) = 0 .
Proof. 
Suppose that tasks in Γ are sorted in decreasing priority under the RM policy, and thus, T 1 T 2 T n . Since H uc ( Γ ) = 0 , T j is an exact multiple of T i for any two tasks τ i and τ j in the task set Γ if T i T j . Hence, T n is divisible by T i for any task τ i Γ , and thus, T n is a common multiple of periods of all higher-priority tasks τ i for 1 i n 1 . Therefore, similar to the proof for Theorem 3, we can obtain that the worst-case slack time S n W of task τ n equals its best-case slack time S n B . Thus, we can obtain H slack ( Γ ) = 0 .    □
Note that a strictly harmonic task set (e.g., task set Γ depicted in Table 2) according to harmonic index H slack may not be strictly harmonic according to the harmonic index H uc (see Examples 1 and 2). Thus, from Corollary 1, we can find that a strictly harmonic task set according to the harmonic index H uc is just a special case of a strictly harmonic task set according to the harmonic index H slack . Therefore, the harmonic index H slack is more general than the harmonic index H uc , and it can more effectively quantify the harmonicity.

3.3. Slack Time Analysis

In order to calculate the slack variation-based harmonic index H slack for a task set Γ , we should analyze the worst-case and best-case slack times for the lowest-priority task in Γ . Now, we first identify the job of a task that experiences the worst-case slack time with Theorem 4.
Theorem 4. 
A job of a task experiences the worst-case slack time when it is released simultaneously with the jobs of all higher-priority tasks.
Proof. 
Consider a task set { τ 1 , , τ n } ordered in decreasing priority under the RM policy. Let J n , k be a job of task τ n that is released at t 1 (i.e., r n , k = t 1 ). As illustrated in Figure 2, we consider that the jobs of a higher-priority task τ i ( 1 i n 1 ) are released at t 2 , t 2 + T i , t 2 + 2 T i , , t 2 + l T i during the interval [ t 1 , t 1 + T n ) . From Figure 2, we can find that shifting the instance release time t 2 of task τ i forward does not increase the slack time for job J n , k until t 2 = t 1 . Therefore, the slack time for job J n , k will be minimized when t 2 coincides with t 1 . The theorem can be proved by repeating this argument for all higher-priority tasks τ i ( 1 i n 1 ).    □
Similarly, we can identify the job of a task that experiences the best-case slack time with the following theorem.
Theorem 5. 
A job of a task experiences the best-case slack time whenever its succeeding job is released concurrently with the jobs of all tasks with higher priorities.
Proof. 
Let { τ 1 , , τ n } be a task set ordered in decreasing priority under the RM policy. Consider a job J n , k of τ n that is released at t 1 T n and its succeeding job J n , k + 1 is released at t 1 (i.e., r n , k = t 1 T n and r n , k + 1 = t 1 ). As illustrated in Figure 3, we consider that the earliest job of a higher-priority task τ i ( 1 i n 1 ) released not before t 1 is released at t 2 (i.e., t 1 t 2 ). From Figure 3, we can find that shifting the instance release time t 2 of task τ i forward does not reduce the slack time for job J n , k until t 2 = t 1 . Therefore, the slack time for job J n , k will be maximized when t 2 coincides with t 1 . The theorem can be proved by repeating this argument successively for all higher-priority tasks τ i ( 1 i n 1 ).    □
Before giving the calculation method for the worst-case slack time and the best-case slack time, we first introduce some definitions about the level-i active period given in [21].
For a task τ i , its pending load  P L i ( t ) refers to the processing workload that must be finished by time t for the jobs with priorities equal to or higher than that of task τ i that are activated before t. A level-i active period is defined as the time interval [ t s , t e ) which meets the conditions P L i ( t s ) = 0 , P L i ( t e ) = 0 , and P L i ( t ) > 0 for every time t ( t s , t e ) . According to [21], for fixed-priority real-time systems, the worst-case duration W L i of a level-i active period is the minimum positive real number x R + that satisfies the condition
x = 1 j i x T j C j .
Note that we can obtain W L i through an iterative process for Equation (15), beginning with a lower bound.
Theorem 6. 
Consider a schedulable task set Γ = { τ 1 , , τ n } on a uniprocessor under the rate monotonic (RM) policy. Here, tasks in Γ are ordered in decreasing priority. Let J n W be a job of task τ n released concurrently with the jobs of all tasks with higher priorities, and let r n W denote its release time. Let r n W + t end be the end time of the available slack for job J n W during the interval [ r n W , r n W + T n ) . Then, the amount of available slack time for J n W can be formulated as
S n W = t end i < n t end T i C i .
Proof. 
Suppose that J n W is released concurrently with the jobs of all tasks with higher priorities at time t 1 . According to Theorem 4, job J n W will experience the worst-case slack time. Figure 4 shows the workload of higher-priority tasks τ i ( i < n ) during [ r n W , r n W + T n ) . Since r n W + t end is the end time of the available slack for job J n W during the interval [ r n W , r n W + T n ) , from Figure 4, we can observe that all the higher-priority jobs released no later than r n W + t end are completed before r n W + t end W , and there is no available slack for J n W during the interval [ r n W + t end , r n W + T n ) . Furthermore, because job J n W is released concurrently with the jobs of all tasks with higher priorities, for each highest-priority task τ i ( i < n ), the count of jobs that need to be executed during the interval [ r n W , r n W + t end W ) is t end / T i . Thus, the workload of tasks with higher priorities during the interval [ r n W , r n W + t end W ) is i < n t end / T i C i . Therefore, the amount of available slack for job J n W can be obtained with Equation (16).   □
According to Theorem 6, we can obtain the worst-case slack time of τ n through searching time t end for job J n W . Since all tasks are released at the same time t = 0 in the beginning, we can consider r n W = 0 for job J n W . Given the worst-case length W L n 1 of a level- n 1 active period, there must be some slack for job J n W during the interval [ T n W L n 1 , T n ) . Therefore, t end for job J n W can be expressed as follows:
t end = arg max t [ T n W L n 1 , T n ] t i < n t T i C i .
Since t end is the end time of the last available slack for job J n W with r n W = 0 during the interval [ 0 , T n ) , a higher-priority task must be invoked at time t end . Therefore, the search space for t end can be reduced to the invoking points of higher-priority tasks during the interval [ T n W L n 1 , T n ) . Let V n W denote the search space for t end ; it can be expressed as follows:
V n W = i < n T n l T i for   all T n W L n 1 T i l T n T i .
By Equations (17) and (18), the worst-case slack time S n W of τ n can be obtained by
S n W = max t V n W t i < n t T i C i .
Based on Equation (18), the exact worst-case slack time of the lowest-priority task in a task set can be obtained in pseud-polynomial complexity with Equation (19), i.e., Lemma 3.
Lemma 3. 
Consider a schedulable task set Γ = { τ 1 , , τ n } on a uniprocessor under the rate monotonic (RM) policy. Here, tasks in Γ are ordered in decreasing priority. We can obtain the exact worst-case slack time of task τ n with the computational complexity O ( n T n / T 1 ) .
Theorem 7. 
Consider a schedulable task set Γ = { τ 1 , τ 2 , , τ n } on a uniprocessor under the rate monotonic (RM) policy. Here, tasks in Γ are ordered in decreasing priority. Let J n B be a job of task τ n whose succeeding job is released concurrently with the jobs of all tasks with higher priorities, and the release time of job J n B is denoted as r n B . Let r n B t end be the end time of the last available slack for job J n B not later than r n B . Then, the amount of available slack time for J n B can be expressed as follows:
S n B = T n + t end i < n T n + t end T i C i .
Proof. 
Suppose that J n B is released at time t 1 and its succeeding job is released simultaneously with the jobs of all tasks with higher priorities at time t 1 + T n . According to Theorem 5, job J n B will experience the best-case slack time for the task τ n . Figure 5 gives the workload of higher-priority tasks τ i ( i < n ) during [ r n B t end , r n B + T n ) . Since r n B t end is the end time of the last available slack for job J n B not later than r n B , from Figure 5, we can observe that the jobs of all tasks with higher priorities released not later than r n B t end are finished before time r n B t end and there is no available slack for J n B during the interval [ r n B t end , r n B ) . Moreover, because the succeeding job of J n B is released concurrently with the jobs of all tasks with higher priorities, for each higher-priority task τ i ( i < n ), the number of jobs that need to be executed during the interval [ r n B t end , r n B + T n ) is ( T n + t end ) / T i . Hence, the workload of the higher-priority tasks during [ r n B , r n B + T n ) is i < n ( T n + t end ) / T i C i t end . Therefore, the amount of available slack for J n B can be expressed with Equation (20).   □
Similar to the worst-case slack time analysis of τ n , t end for job J n B can be expressed as
t end = arg min t V n B T n + t i < n T n + t T i C i .
where V n B is the search space for t end of job J n B , and it can be expressed as
V n B = i < n l T i T n for   all T n T i l T n + W L n 1 T i .
From Equation (21), we can obtain the best-case slack time S n B for task τ n as
S n B = min t V n B T n + t i < n T n + t T i C i .
Based on Equation (22), the exact best-case slack time for the lowest-priority task in a task set can be obtained in pseudo-polynomial complexity with Equation (23), i.e., Lemma 4.
Lemma 4. 
Consider a schedulable task set Γ = { τ 1 , , τ n } on a uniprocessor under the rate monotonic (RM) policy. Here, tasks in Γ are ordered in decreasing priority. We can obtain the exact best-case slack time of τ n with the computational complexity O ( n T n / T 1 ) .
By the definition of the slack variation-based harmonic index (i.e., Equation (14)), we can derive Theorem 8 by using Lemmas 3 and 4.
Theorem 8. 
Consider a schedulable task set Γ = { τ 1 , , τ n } on a uniprocessor under rate monotonic (RM) policy. Here, tasks in Γ are ordered in decreasing priority. The slack variation-based harmonic index of Γ can be derived with the computational complexity O ( n T n / T 1 ) .

4. Enhanced Harmonic Task Partitioning

With the slack variation-based harmonic index, we propose two efficient partitioned scheduling algorithms to improve the system utilization via strategically allocating the workload among processors by leveraging the task harmonic relationship. In the following, we first introduce an algorithm (named EHAP-SV) to optimize the system usage by identifying tasks with high harmonicity and grouping them into a single processor. However, the EHAP-SV algorithm suffers from the “fragmentation” problem as it does not consider some workload characteristics in the task allocation. To address this issue, we present the WAHP-SV algorithm, a workload-aware harmonic partitioning method. WAHP-SV incorporates both harmonicity and workload characteristics into the scheduling approach to address the “fragmentation” issue in the EHAP-SV algorithm.

4.1. Harmonic Partitioning Based on Slack Analysis

Before presenting our harmonic-aware partitioning method, let us discuss the limitations of the current harmonicity-aware partitioning approach using an example. In [14], a harmonicity-aware task partitioning algorithm (named HAPS) is proposed. HAPS measures the harmonicity degree of a task set by using the utilization change-based harmonic index and allocates harmonic tasks to an identical processor. It has been demonstrated that HAPS outperforms traditional bin-packing approaches. However, HAPS cannot optimize the schedulability of certain task sets, since the harmonic index used by HAPS is too tight to effectively quantify the harmonicity of some task sets (see Example 1). In the following, we will illustrate the effect of the inaccurate harmonicity quantification on the harmonicity-aware task partitioning with an example.
Example 3. 
Let us consider a task set Γ = { τ 1 , τ 2 , τ 3 , τ 4 , τ 5 } , given in Table 3, to be executed on processors Π = { π 1 , π 2 } under RM policy. When the HAPS strategy is employed to partition this task set, HAPS considers that tasks τ 1 , τ 2 , and τ 3 are not harmonic, and it partitions all tasks into three groups, { τ 1 , τ 4 } , { τ 3 , τ 5 } , { τ 2 } , one by one. This implies that HAPS requires three processors to schedule Γ. Hence, HAPS fails to partition Γ for processors π 1 and π 2 , even though a high overall capacity is still available on processors π 1 and π 2 . This is primarily because the harmonic index used by HAPS is too tight to effectively quantify the harmonicity of task set { τ 1 , τ 2 , τ 3 } from the perspective of the system utilization. In the following, we propose a feasible partitioning method for Γ. This strategy considers the harmonicity characteristic through slack analysis during task deployment, thereby enhancing system utilization (refer to Example 4).
To enhance the processor utilization through efficient harmonic-aware partitioning based on effective harmonicity quantification, we propose an enhanced harmonic-aware partitioning algorithm using the slack variation-based harmonic index (named EHAP-SV). In EHAP-SV, some candidate subsets are generated first by identifying the harmonic tasks with the slack variation-based harmonic index. Then, the highest utilization subset is picked for assignment to a processor to enhance system utilization.
The EHAP-SV algorithm is given in Algorithm 1. It begins by initializing the required processor number k to zero, and then, proceeds to allocate tasks group by group by using the slack variation-based harmonic index (lines 3–42). Every task τ i Γ is considered to be the host task in a sub-task set Γ i sub (line 5), and remaining tasks are picked to be added to Γ i sub until all feasible tasks have been exhausted (lines 6–30). To ensure the schedulability of the assigned task sets, a schedulability analysis can be performed using the efficient exact schedulability test approach proposed in [22]. During the generation of the sub-task set Γ i sub , the feasible task with the minimum harmonic index is selected first (lines 14–17). For multiple feasible tasks with a minimum harmonic index, the task with higher utilization is selected first (lines 18–20). After all subsets are generated, the subsets with the highest utilization are selected and assigned to a core (lines 32–40). Then, these tasks are deleted from Γ (line 41). This process is iterated for the remaining tasks in task set Γ until all tasks have been allocated to processors.
Theorem 9. 
For a task set Γ = { τ 1 , , τ n } , if EHAP-SV partitions it onto m processors Π = { π 1 , , π m } with success and schedules it under the RM scheduling policy, all tasks in Γ can satisfy their deadlines.
Proof. 
Let us take processor π j Π and its assigned task set Γ ( π j ) into consideration. As indicated in line 12 in Algorithm 1, it is schedulable for Γ ( π j ) to be executed on processor π j according to RM scheduling policy. This implies that the task set assigned to each processor is schedulable.    □
From Theorem 9, we can conclude that the task allocation produced by EHAP-SV consistently guarantees that all tasks in Γ meet their deadlines.
Algorithm 1 EHAP-SV algorithm.
Input: 
Task set Γ = { τ 1 , , τ n } , multiprocessor platform Π .
Output: 
Task partitions { Γ ( π 1 ) , , Γ ( π k ) } .
Goal: 
To partition task set Γ on multiprocessor platform Π .
  1:
k 0
  2:
while  Γ   do
  3:
    k k + 1
  4:
   for each task τ i Γ  do
  5:
      Γ i sub { τ i }
  6:
      Γ untest Γ { τ i }
  7:
     while  Γ untest  do
  8:
         τ selected NIL
  9:
         U selected 0
10:
         H min 1
11:
        for each task τ j Γ untest  do
12:
          if It is feasible for Γ i sub { τ j }  then
13:
              H j H slack ( Γ i sub { τ j } )
14:
             if  H min > H j  then
15:
                H min H j
16:
                τ selected τ j
17:
                U selected U j
18:
             else if  H min = H j and U selected < U j
19:
                τ selected τ j  then
20:
                U selected U j
21:
             end if
22:
          else
23:
              Γ untest Γ untest { τ j }
24:
          end if
25:
        end for
26:
        if  τ selected NIL  then
27:
           Γ i sub Γ i sub { τ selected }
28:
           Γ untest Γ untest { τ selected }
29:
        end if
30:
     end while
31:
   end for
32:
    Γ selected
33:
    U max 0
34:
   for each task τ i Γ  do
35:
     if  U max < U Γ i sub  then
36:
         Γ selected Γ i sub
37:
         U max U Γ i sub
38:
     end if
39:
   end for
40:
    Γ ( π k ) Γ selected
41:
    Γ Γ Γ selected
42:
end while
From Algorithm 1, it is evident that the computational complexity of the EHAP-SV algorithm is primarily influenced by the feasibility test’s complexity, the complexity of computing the harmonic index based on slack variation, and the task set size. The feasibility tests can be achieved in pseudo-polynomial time with the WCRT analysis using the iterative technique [22]. In addition, from Theorem 8, we can obtain that the calculation of the slack variation-based harmonic index also exhibits pseudo-polynomial time complexity. Therefore, we can conclude that the EHAP-SV algorithm’s time complexity is pseudo-polynomial.
Example 4. 
Let us consider the task set Γ given in Table 3 once again. As illustrated in Figure 6, it is the task partitioning process for Γ using EHAP-SV. We can see that EHAP-SV partitions all tasks in two groups, { τ 1 , τ 2 , τ 3 } and { τ 4 , τ 5 } , one by one. Consequently, EHAP-SV can allocate the task set Γ to two processors by effectively exploring the harmonic relationship based on its effective harmonicity quantification.

4.2. Workload-Aware Harmonic Partitioning

The EHAP-SV method can optimize system usage by leveraging the harmonic relationship to assign harmonic tasks to the same processor. However, it may face performance degradation when dealing with heavy-utilization tasks, as it does not consider certain workload characteristics during the task allocation. To address this issue, we design a metric that combines harmonic relationship exploration with workload awareness to guide task allocation, and design a workload-aware harmonic task partitioning method (named WAHP-SV).
Algorithm 2 gives the WAHP-SV algorithm. Unlike EHAP-SV, we introduce a new metric, denoted as ν j , for each task τ j . This metric is employed for determining tasks that exhibit both high harmonicity and high workload for generating candidate subsets in WAHP-SV. For a sub-task set Γ i sub and a task τ j , the metric ν j is defined by
ν j = U j H slack ( Γ i sub { τ j } ) .
where U j is the utilization of task τ j and it is used for workload awareness. H slack ( Γ i sub { τ j } ) is a measure of the harmonicity for task set Γ i sub { τ j } and it is used for harmonic awareness. In the task assignment, the tasks with higher ν j are prioritized (lines 13–15).
Theorem 10. 
For a task set Γ, if WAHP-SV successfully partitions it onto m processors Π = { π 1 , , π m } and schedules it under the RM scheduling policy, all tasks in Γ can satisfy their deadlines.
Proof. 
Let us take processor π j Π and its assigned task set Γ ( π j ) into consideration. As indicated in line 11 in Algorithm 2, it is feasible for Γ ( π j ) to be executed on processor π j under the RM policy. This indicates that it is schedulable for the task set on each processor.    □
From Theorem 10, we can conclude that the task allocation produced by WAHP-SV consistently guarantees that all tasks in Γ meet their deadlines.
From Algorithm 2, it is evident that the time complexity of the WAHP-SV algorithm is identical to that of the EHAP-SV algorithm. Thus, the time complexity of the WAHP-SV algorithm is also pseudo-polynomial.
It is worth noting that WAHP-SV can also partition the task set Γ given in Table 3 for two processors. Furthermore, the experimental evaluation demonstrates that WAHP-SV outperforms EHAP-SV in terms of schedulability, attributed to its ability to be aware of workload and explore harmonic relationships.
Algorithm 2 WAHP-SV algorithm.
Input: 
Task set Γ = { τ 1 , , τ n } , multiprocessor platform Π .
Output: 
Task partitions { Γ ( π 1 ) , , Γ ( π k ) } .
Goal: 
To partition task set Γ on multiprocessor platform Π .
  1:
k 0
  2:
while  Γ   do
  3:
    k k + 1
  4:
   for each task τ i Γ  do
  5:
      Γ i sub { τ i }
  6:
      Γ untest Γ { τ i }
  7:
     while  Γ untest  do
  8:
         τ selected NIL
  9:
         ν max 0
10:
        for each task τ j Γ untest  do
11:
          if It is feasible for Γ i sub { τ j }  then
12:
              ν j U j H slack ( Γ i sub { τ j } )
13:
             if  ν max < ν j  then
14:
                τ selected τ j
15:
                ν max ν j
16:
             end if
17:
          else
18:
              Γ untest Γ untest { τ j }
19:
          end if
20:
        end for
21:
        if  τ selected NIL  then
22:
           Γ i sub Γ i sub { τ selected }
23:
           Γ untest Γ untest { τ selected }
24:
        end if
25:
     end while
26:
   end for
27:
    Γ selected
28:
    U max 0
29:
   for each task τ i Γ  do
30:
     if  U max < U Γ i sub  then
31:
         Γ selected Γ i sub
32:
         U max U Γ i sub
33:
     end if
34:
   end for
35:
    Γ ( π k ) Γ selected
36:
    Γ Γ Γ selected
37:
end while

5. Experimental Evaluation

To assess the effectiveness of our enhanced harmonic task partitioning methods, we implemented eight algorithms in the experiment, which are listed below:
  • BFDU: an extension of the best-fit (BF) strategy, where tasks are ordered in decreasing utilization;
  • WFDU: an extension of the worst-fit (WF) strategy, where tasks are ordered in decreasing utilization;
  • FFDU: an extension of the first-fit (FF) strategy, where tasks are ordered in decreasing utilization;
  • PSER: a harmonic partition scheduling algorithm based on the period scaling from [14];
  • HAPS: a harmonic partition scheduling algorithm with the harmonic index based on utilization change from [14];
  • ENSE: an ensemble method of BFDU, WFDU, FFDU, PSER, and HAPS;
  • EHAP-SV: our enhanced harmonic partition scheduling algorithm with harmonic index based on slack variation;
  • WAHP-SV: our workload-aware harmonic partition scheduling algorithm with harmonic index based on slack variation.
Objectives. Our evaluation has two primary goals: to compare the performance of our enhanced harmonic task partitioning algorithms with existing algorithms regarding schedulability; and to evaluate the required number of processors for different partition approaches.

5.1. Workload

To evaluate the performance of various methods in relation to system utilization, we synthesized two types of task sets (i.e., light task sets and general task sets) by the UUniFast approach from [23]. For the light task sets, task utilization is uniformly distributed within [0, 0.5], and for general task sets, task utilization is evenly distributed within [0, 1]. The task period is evenly distributed within [100, 1000]. For a task set Γ , we define its normalized utilization U nor ( Γ ) as
U nor ( Γ ) = U Γ m .
where m is the processor number and U Γ is the utilization of Γ . We consider three values for m: 4, 8, and 16.
With the above parameters, we created task sets with normalized utilization U nor ranging from 0.7 to 0.975 with an increment of 0.025 . We synthesized 1000 task sets for each U nor .

5.2. Results

Schedulability. Figure 7 and Figure 8 illustrate the schedulable task set fraction plotted against the normalized system utilization in systems with 4 processors, 8 processors, and 16 processors for light task sets and general task sets, respectively.
We make several observations regarding the performance of the existing algorithms. First, HAPS consistently outperforms BFDU, WFDU, FFDU, and PSER in most cases. This is because HAPS can take advantage of harmonics to enhance the schedulability of the system by taking into account both the period and utilization of each task in the quantification of harmonicity, while BFDU, WFDU, and FFDU overlook the effect of harmonic relationship exploration on the system schedulability and PSER only considers the relationship among periods of tasks in the harmonicity quantification. Second, BFDU, WFDU, and FFDU outperform PSER in the systems with four and eight processors for all types of task sets. This is because BFDU, WFDU, and FFDU can enhance the system schedulability by leveraging the task workload characteristic, especially for the general task sets with some heavy tasks. Third, the schedulability enhancement of BFDU, WFDU, and FFDU over PSER is reduced as the processor number rises, and they perform worse than PSER for 16-processor systems. This can be attributed to the fact that with more processors there are more tasks in a task set, providing more chances for PSER to enhance system schedulability by exploiting the task period relationships.
Our primary result is that EHAP-SV and WAHP-SV consistently outperform all existing partitioned scheduling methods owing to the effective harmonicity quantification of the slack variation-based harmonic index. Note that EHAP-SV and WAHP-SV also always outperform the ensemble method (i.e., ENSE) of BFDU, WFDU, FFDU, PSER, and HAPS. This demonstrates that EHAP-SV and WAHP-SV can find additional schedulable task sets that have not been found so far with existing methods. The performance enhancement grows with increasing processor number, depicting the scalability of EHAP-SV and WAHP-SV. For 16-processor systems, when the system utilization is 0.975, WAHP-SV schedules about 21.9% and 33.2% of task sets for light task sets and general task sets, respectively, while all existing methods schedule almost none of them. Even without workload awareness, for general task sets, when the system utilization is 0.95, the performance improvement of EHAP-SV over the ensemble method ENSE due to the effective harmonic quantification is as much as 48.3% in a four-processor system and 152.9% in an eight-processor system. In addition, we can also see that WAHP-SV always outperforms EHAP-SV in all test cases, and the schedulability improvement of WAHP-SV over EHAP-SV becomes more significant as the task set utilization increases, especially for general task sets. As system utilization increases, tasks with higher utilization are prone to be part of a general task set, and WAHP-SV can significantly improve the partitioning of such task sets through workload awareness. In particular, when system utilization is 0.95 in four-processor systems, the schedulable ratio achieved by WAHP-SV is nearly double that of EHAP-SV.
Number of processors. Figure 9 and Figure 10 illustrate the relationship between the required processor number and normalized system utilization for systems with 4, 8, and 16 processors for light task sets and general task sets, respectively.
From the experimental results, we can observe that both EHAP-SV and WAHP-SV outperform all existing methods including the ensemble method ENSE in most test cases. This can be attributed to the fact that EHAP-SV and WAHP-SV enhance the performance through efficient exploration of harmonic relationships based on effective quantification of harmonicity. The results also demonstrate that WAHP-SV outperforms EHAP-SV in some test cases, owing to its effective integration of harmonic relationship exploration and workload awareness. Additionally, we can observe that WAHP-SV can save up to one processor compared to the non-harmonic partitioned scheduling approaches (i.e., BFDU, WFDU, and FFDU) in 8-processor system and 16-processor systems for both light and general task sets.

6. Conclusions and Future Work

As one of the primary approaches in multiprocessor scheduling, partitioned scheduling has been widely accepted in both academic and industrial fields of IoT to efficiently process substantial streams of sensor-generated data while maintaining real-time performance. In this study, we propose an enhanced harmonic partitioned scheduling method that is based on efficient harmonic relationship exploration. In our approach, we designed a harmonic index to guide the task partition by quantifying the task set harmonicity in terms of the maximum variation in the slack time of the lowest-priority task in the task set. With our proposed harmonic index, we presented a harmonic task partitioning scheme (named HWAP-SV) for periodic real-time tasks scheduled on multiprocessors following RM policy. Furthermore, to alleviate the problem of “fragmentation” in the pure harmonic task partitioning method, we also proposed a workload-aware harmonic task partitioning scheme called WAHP-SV by designing a metric that combines harmonic relationship exploration with workload awareness to strategically allocate workloads among processors. Our evaluation shows that both EHAP-SV and WHAP-SV consistently surpass the state-of-the-art partitioned scheduling methods. We believe that similar results can be obtained for the mixed-criticality task model and directed acyclic graph (DAG) task model owing to the generality of the slack variation-based harmonic index, and we would like to verify this in the future.

Author Contributions

Conceptualization, J.R. and J.Z.; methodology, J.R. and J.Z.; software, J.Z. and S.L.; validation, X.L. and W.C. (Wei Cao); formal analysis, J.R. and X.L.; investigation, S.L. and W.C. (Wenxin Chu); writing—original draft preparation, J.R. and J.Z.; writing—review and editing, J.R. and J.Z.; visualization, C.S.; supervision, J.R. and J.Z.; project administration, J.R.; funding acquisition, J.R. and W.C (Wei Cao). All authors have read and agreed to the published version of the manuscript.

Funding

This research was funded by the National Natural Science Foundation of China under Grant Nos. 62072067, 62466059, 61602080, U1808206, 61872052 and 61602084, the Shandong Provincial Natural Science Foundation under Grant No. ZR2023LZH016, the Xinjiang Network Information Science and Technology Innovation Research Project under grant No. 12421604, the Natural Science Foundation of Xinjiang Uygur Autonomous Region under Grant No. 2022D01A228, the Dalian Young Star of Science and Technology Project under Grant No. 2021RQ055, the Social Science Foundation of Liaoning Province under Grant No. L17CTQ002, and the Fundamental Research Funds for the Central Universities under Grant No. DUT21JC27.

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

Data are contained within the article.

Conflicts of Interest

The authors declare no conflicts of interest.

References

  1. Pyun, K.R.; Kwon, K.; Yoo, M.J.; Kim, K.K.; Gong, D.; Yeo, W.H.; Han, S.; Ko, S.H. Machine-learned wearable sensors for real-time hand-motion recognition: Toward practical applications. Natl. Sci. Rev. 2024, 11, nwad298. [Google Scholar] [CrossRef] [PubMed]
  2. Li, Y.; Liu, C.; Zou, H.; Che, L.; Sun, P.; Yan, J.; Liu, W.; Xu, Z.; Yang, W.; Dong, L.; et al. Integrated wearable smart sensor system for real-time multi-parameter respiration health monitoring. Cell Rep. Phys. Sci. 2023, 4, 101191. [Google Scholar] [CrossRef]
  3. Rao, A.S.; Radanovic, M.; Liu, Y.; Hu, S.; Fang, Y.; Khoshelham, K.; Palaniswami, M.; Ngo, T. Real-time monitoring of construction sites: Sensors, methods, and applications. Autom. Constr. 2022, 136, 104099. [Google Scholar] [CrossRef]
  4. Sangaiah, A.K.; Rostami, A.S.; Hosseinabadi, A.A.R.; Shareh, M.B.; Javadpour, A.; Bargh, S.H.; Hassan, M.M. Energy-aware geographic routing for real-time workforce monitoring in industrial informatics. IEEE Internet Things J. 2021, 8, 9753–9762. [Google Scholar] [CrossRef]
  5. Venkatraman, S.; Goel, N.; Singaravelu, M.; Namana, S.; Mohan, M.; Rohith, G. Optimised distributed sensor system for covid protocol monitoring using multiprocessor architecture. Meas. Sensors 2023, 25, 100653. [Google Scholar] [CrossRef]
  6. Jugade, C.; Mohamed, S.; Goswami, D.; Nelson, A.T.; Veen, G.v.; Goossens, K.G.W. Predictable multi-core implementation of multi-rate sensor fusion for high-precision positioning systems. In Proceedings of the American Control Conference, Toronto, ON, Canada, 8–12 July 2024; Institute of Electrical and Electronics Engineers: Los Alamitos, CA, USA, 2024; pp. 4470–4477. [Google Scholar]
  7. Jiang, Q.; Wang, H.; Kong, Q.; Zhang, Y.; Chen, B. On-Orbit Remote Sensing Image Processing Complex Task Scheduling Model Based on Heterogeneous Multiprocessor. IEEE Trans. Geosci. Remote Sens. 2023, 61, 1001718. [Google Scholar] [CrossRef]
  8. Cilardo, A.; Cinque, M.; Simone, L.D.; Mazzocca, N. Virtualization Over Multiprocessor Systems-on-Chip: An Enabling Paradigm for the Industrial Internet of Things. Computer 2022, 55, 35–47. [Google Scholar] [CrossRef]
  9. Baciu, M.D.; Capota, E.A.; Stângaciu, C.S.; Curiac, D.I.; Micea, M.V. Multi-Core Time-Triggered OCBP-Based Scheduling for Mixed Criticality Periodic Task Systems. Sensors 2023, 23, 1960. [Google Scholar] [CrossRef] [PubMed]
  10. Stevanato, A.; Cucinotta, T.; Abeni, L.; Oliveira, D.B.D. An Evaluation of Adaptive Partitioning of Real-Time Workloads on Linux. In Proceedings of the IEEE 24th ISORC, Daegu, Republic of Korea, 1–3 June 2021; pp. 53–61. [Google Scholar]
  11. Munien, C.; Ezugwu, A.E. Metaheuristic algorithms for one-dimensional bin-packing problems: A survey of recent advances and applications. J. Intell. Syst. 2021, 30, 636–663. [Google Scholar] [CrossRef]
  12. Sun, Z.; Guo, M.; Liu, X. A Survey of Real-Time Scheduling on Multiprocessor Systems. In Proceedings of the 39th NCTCS, Yinchuan, China, 23–25 July 2021; pp. 89–118. [Google Scholar]
  13. Kumar, A.; Gupta, S.K. A systematic survey of multiprocessor real-time scheduling and synchronization protocol. Int. J. Sens. Wirel. Commun. Control 2022, 12, 212–229. [Google Scholar] [CrossRef]
  14. Fan, M.; Han, Q.; Liu, S.; Ren, S.; Quan, G.; Ren, S. Enhanced fixed-priority real-time scheduling on multi-core platforms by exploiting task period relationship. J. Syst. Softw. 2015, 99, 85–96. [Google Scholar] [CrossRef]
  15. Han, C.C.; Tyan, H.Y. A Better Polynomial-Time Schedulability Test for Real-Time Fixed-Priority Scheduling Algorithms. In Proceedings of the IEEE 18th RTSS, San Francisco, CA, USA, 3–5 December 1997; pp. 36–45. [Google Scholar]
  16. Wang, T.; Homsi, S.; Niu, L.; Ren, S.; Bai, O.; Quan, G.; Qiu, M. Harmonicity-Aware Task Partitioning for Fixed Priority Scheduling of Probabilistic Real-Time Tasks on Multi-Core Platforms. ACM TECS 2017, 16, 101:1–101:21. [Google Scholar] [CrossRef]
  17. Ren, J.; Bi, R.; Su, X.; Liu, Q.; Wu, G.; Tan, G. Workload-aware harmonic partitioned scheduling for probabilistic real-time systems. In Proceedings of the DATE, Dresden, Germany, 19–23 March 2018; pp. 213–218. [Google Scholar]
  18. Wang, T.; Han, Q.; Sha, S.; Wen, W.; Quan, G.; Qiu, M. On Harmonic Fixed-Priority Scheduling of Periodic Real-Time Tasks with Constrained Deadlines. In Proceedings of the 53rd ACM/EDAC/IEEE DAC, Austin, TX, USA, 5–9 June 2016; pp. 1–6. [Google Scholar]
  19. Ren, J.; Su, X.; Xie, G.; Yu, C.; Tan, G.; Wu, G. Workload-Aware Harmonic Partitioned Scheduling of Periodic Real-Time Tasks with Constrained Deadlines. In Proceedings of the The 56th ACM/IEEE DAC, Las Vegas, NV, USA, 2–6 June 2019; pp. 1–6. [Google Scholar]
  20. Joseph, M.; Pandya, P. Finding Response Times in a Real-Time System. Comput. J. 1986, 29, 390–395. [Google Scholar] [CrossRef]
  21. Bril, R.J.; Lukkien, J.J.; Verhaegh, W.F.J. Worst-Case Response Time Analysis of Real-Time Tasks under Fixed-Priority Scheduling with Deferred Preemption. Real-Time Syst. 2009, 42, 63–119. [Google Scholar] [CrossRef]
  22. Davis, R.I.; Zabos, A.; Burns, A. Efficient Exact Schedulability Tests for Fixed Priority Real-Time Systems. IEEE Trans. Comput. 2008, 57, 1261–1276. [Google Scholar] [CrossRef]
  23. Bini, E.; Buttazzo, G.C. Measuring the Performance of Schedulability Tests. Real-Time Syst. 2005, 30, 129–154. [Google Scholar] [CrossRef]
Figure 1. Simulation of an SAS for { τ 1 , τ 2 , τ 3 } given in Table 2.
Figure 1. Simulation of an SAS for { τ 1 , τ 2 , τ 3 } given in Table 2.
Sensors 24 05773 g001
Figure 2. Scenario illustration for the proof of Theorem 4.
Figure 2. Scenario illustration for the proof of Theorem 4.
Sensors 24 05773 g002
Figure 3. Scenario illustration for the proof of Theorem 5.
Figure 3. Scenario illustration for the proof of Theorem 5.
Sensors 24 05773 g003
Figure 4. Workload of higher-priority tasks τ i ( i < n ) during [ r n W , r n W + T n ) .
Figure 4. Workload of higher-priority tasks τ i ( i < n ) during [ r n W , r n W + T n ) .
Sensors 24 05773 g004
Figure 5. Workload of higher-priority tasks τ i ( i < n ) during [ r n B t end , r n B + T n ) .
Figure 5. Workload of higher-priority tasks τ i ( i < n ) during [ r n B t end , r n B + T n ) .
Sensors 24 05773 g005
Figure 6. Task partitioning process with EHAP-SV.
Figure 6. Task partitioning process with EHAP-SV.
Sensors 24 05773 g006
Figure 7. Fraction of schedulable tasks sets for light task sets.
Figure 7. Fraction of schedulable tasks sets for light task sets.
Sensors 24 05773 g007aSensors 24 05773 g007b
Figure 8. Fraction of schedulable tasks sets for general task sets.
Figure 8. Fraction of schedulable tasks sets for general task sets.
Sensors 24 05773 g008aSensors 24 05773 g008b
Figure 9. Processor requirements for light task sets.
Figure 9. Processor requirements for light task sets.
Sensors 24 05773 g009aSensors 24 05773 g009b
Figure 10. Processor requirements for general task sets.
Figure 10. Processor requirements for general task sets.
Sensors 24 05773 g010aSensors 24 05773 g010b
Table 1. Major notation used in the paper.
Table 1. Major notation used in the paper.
NotationDescription
C i Worst-case execution time of task τ i
T i Period of task τ i
D i Relative deadline of task τ i
J i , k A job of task τ i
r i , k Release time of job J i , k
R i Worst-case response time of task τ i
U i , U Γ Utilization of task τ i and task set Γ , respectively
H Γ Hyperperiod of task set Γ
S i , k Slack time for a job J i , k of task τ i
S i W Worst-case slack time of task τ i
S i B Best-case slack time of task τ i
H uc ( Γ ) Utilization change-based harmonic index of task set Γ
H slack ( Γ ) Slack variation-based harmonic index of task set Γ
Table 2. An example task set for harmonic index H uc .
Table 2. An example task set for harmonic index H uc .
Task C i T i T i
τ 1 121.5
τ 2 133
τ 3 166
Table 3. Task parameters of an example task set.
Table 3. Task parameters of an example task set.
Task C i T i D i U i
τ 1 1220.5
τ 2 1330.3333
τ 3 1660.1667
τ 4 1.5550.3
τ 5 4770.5714
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Ren, J.; Zhang, J.; Li, X.; Cao, W.; Li, S.; Chu, W.; Song, C. Enhanced Harmonic Partitioned Scheduling of Periodic Real-Time Tasks Based on Slack Analysis. Sensors 2024, 24, 5773. https://doi.org/10.3390/s24175773

AMA Style

Ren J, Zhang J, Li X, Cao W, Li S, Chu W, Song C. Enhanced Harmonic Partitioned Scheduling of Periodic Real-Time Tasks Based on Slack Analysis. Sensors. 2024; 24(17):5773. https://doi.org/10.3390/s24175773

Chicago/Turabian Style

Ren, Jiankang, Jun Zhang, Xu Li, Wei Cao, Shengyu Li, Wenxin Chu, and Chengzhang Song. 2024. "Enhanced Harmonic Partitioned Scheduling of Periodic Real-Time Tasks Based on Slack Analysis" Sensors 24, no. 17: 5773. https://doi.org/10.3390/s24175773

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop