A feasible schedule will assign each node of GM a start time Stiand a finish time F tiwhile
ensuring all the constraints. We have two types of nodes in the mixed graph: computation
node and communication node. We define a tuple for each computation node vi as {P , P set},
where P denotes the priority and P set = {vk : e(vk, vi) ∈ EM} is the set of predecessors of
node vi. For each communication (message) node, vi, the tuple takes the form, {P , D, P set,
Iset}, where D denotes the degree,and Iset = {vk: | parent(vi) - vk| ≤ (1+ δ)| vi - parent(vi)
Input: Network Graph G = (V ,E)
Output: Energy-unaware Feasible Schedule Schu
1. Convert G into mixed graph GM.
2. For each computation node in GM, make a tuple (P , P set);
For each communication node in GM, make a tuple (P , D,
P set, Iset).
3. Sort nodes in GM in a non-increasing order of priority, P .
4. Nodes with equal priority are sorted in non-increasing order of degree, D.
Q = Sorted list of all nodes in GM.
5. while Q 6= NULL do
Pick the first node vifrom Q.
Assign the smallest integer number φi(≥ 0) to visuch that
φi> φj∀ j ∈ P set(i), and if viis a message then φi6= φj∀ j ∈ Iset(i) end Q = {Q} - {vi}. end
6. C = List of nodes vi, sorted in increasing order of their
assigned number, φ, SlotF inishφprev = 0
while C 6= NULL do
CC = Set of all nodes vihaving the same number, φi.
For all nodes in CC { Sti= SlotF inishφprev
F ti = Sti + Slt, if viis a task
F ti = Sti + Slm, if viis a message
}
if all these nodes vi are tasks then
SlotF inishφi= SlotF inishφprev + Slt
end
if all these nodes vi are messages then
SlotF inishφi= SlotF inishφprev + Slm
end else
SlotF inishφi= SlotF inishφprev + max{Slm, Slt}
end
SlotF inishφprev= SlotF inishφi
C = {C} - {CC} end
ma m1 Mixed Graph, GM(VM, EM, UM) Network Graph, G(V, E) B tB mB e d b a f g h mb ta tb md me mf mg mh th tc td tg tf mc te t1 m2 m3 m4 t2 t3 t4 2 1 3 4 c
Figure 2.6: Conversion of Network Graph to Mixed Graph
The start time of a node must be greater than or equal to the finish times of all its predecessor nodes. In order to enforce the precedence constraints, we use a priority mechanism.
For each node in GM, there exists a single multi-hop path to the root. This path can be found
by considering only the directed edges. P riority of a node is the number of hops in this path. Thus a child will always have higher priority than its parent. Nodes are now arranged in a non-increasing order of priority and selected in this order for scheduling. Due to this, a child node will be scheduled first. When the parent node is selected for scheduling, its start time must be greater than or equal to the finish time of all its predecessors (which would already be scheduled given their higher priority) thus ensuring the precedence order.
Unlike computation nodes, scheduling for message nodes requires additional considerations for interference constraints. The schedules of interfering nodes must be excluded in time. In the mixed graph, we model interference constraints among communication nodes by drawing an undirected edge between them. The number of undirected edges incident upon a message node is defined as its degree, D. Now, nodes with equal priority are sorted in non-increasing order of their degree and picked in this order for scheduling. We utilize the approach of ordering the message nodes in decreasing order of degree [28], so that nodes which interfere with maximum number of other nodes are scheduled first. Hence nodes scheduled later have to check for fewer
nodes before being scheduled, thus reducing the scheduling overhead. Now a node is picked from this sorted set and assigned the smallest slot not yet assigned to a conflicting entity. Algorithm 1 presents the pseudo code for the initial schedule construction.
Unlike traditional TDMA scheduling where all the slots are of same length, joint scheduling of tasks and messages requires variable length slots. At the start, all tasks and messages are
assumed to be at the highest level. We define two types of time slots, Slt and Slm for tasks
and messages respectively. Notice that since the data packet size for the messages and the computation cycles for tasks is constant across the whole network, given a performance level every node will require the same amount of time for task computation and message transmission respectively.
As shown in Algorithm 1, given a sorted set of entities, we first decide which entities can be scheduled in parallel, by assigning each entity a number. Later based on the composition of the set of entities having the same number, the slot length can be decided. For example, if all task nodes are aligned in parallel then the slot length will be different than when all message nodes are aligned in parallel. But if a combination of tasks and messages are aligned in parallel, the slot length will be determined by the entity with larger time requirement. Due to unequal time requirements, holes can be created in the schedule as shown in Fig. 2.7.
If the finish time of the last node is greater than the deadline, then this set of tasks and messages cannot be feasibly scheduled. Please note that the objective in step 2 is not to create a minimum makespan schedule. Rather it is to create a slotted schedule such that entities are aligned in parallel. This approach is so designed because it makes slack allocation in step 3 computationally easier to perform as described in the next section. For the mixed graph shown in Fig. 2.6, the initial schedule can be constructed as shown in Fig. 2.7. The tasks of the leaf nodes are all scheduled in parallel in the beginning of the schedule. They are removed in Fig. 2.7 for the sake of clarity.