At the beginning of each frame, the compensation block classifies a flow (i.e., a CID) as sensing a good or a bad channel on the basis of the CINR reports received by the relevant target SS. Accordingly, CIDs destined to an SS sensing a lossy channel are marked as “banned” from being transmitted. When the error-free service scheduler selects a head-of-line (HOL) packet to be extracted from queue i, it interacts with the compensator to check whether the CID of the selected packet is banned or not. If it is banned (the packet would risk to be corrupted if transmitted over the radio link), then the scheduler looks for a packet belonging to an unmarked flow of the same class (i.e., in the same queue) to transmit instead of the HOL packet. To help the scheduler in selecting the substitute flow, the compensator manages a debit/credit counter for each active (leading or lagging) flow. Each time a flow substitutes another one for transmission, it is considered as a leading flow, and its credit counter increases by one; at the same time, the replaced flow is considered as a lagging flow, and its debit counter increases by one. Each time a HOL packet cannot be transmitted due to poor channel conditions, the substitute flow is the one with the highest debit counter among unmarked flows of the same class. If no unmarked packets can be found in the queue, then the entire queue is banned and the turn passes to the successive queue.
The pseudocode listed below briefly shows how the compensator works and interacts with the scheduler, regardless of the specific algorithm (WF2Q+ or DRR) this latter uses.
1 ban flow if CINR > CINRthr;
2 until available resources {
3 until a pkt is dequed || all queues examined {
4 scheduler selects queue x : x !banned i.e. scheduler selects flow i = head(x);
5 if i is marked {
6 select less serviced flow j : j !banned;
7 if !found {
8 mark x;
9 goto 3; }
10 else {
11 deque pkt;
12 modify scheduler variables;
13 modify credit/debit counter of i and j;
14 exit; } }
15 else {
16 modify scheduler variables;
17 deque pkt; } } }
At the beginning of each frame, the compensator bans the flows directed to SSs, which currently sense a lossy channel (line 1), according to the received channel state information reports. For the duration of the DL subframe, packets within the queues are examined by the scheduler until at least one queue contains a packet belonging to an unbanned CID (lines 2–3). The scheduler selects the queue to be served among all backlogged (and unbanned) queues; this corresponds to select the first packet in the queue (line 4). If this packet belongs to an unbanned flow, then it gains service and the variables for the specific scheduling algorithm (WF2Q+ or DRR) are updated accordingly (lines 15–17). These variables can be the quantum and deficit counter values for DRR, and (S, F, V) values for WF2Q+. Otherwise, if the HOL packet is banned, the scheduler starts searching for the unbanned flow (in the same queue) that has received the worst service in the past (lines 5–6). If no unbanned flow exists, the Scheduler considers the entire queue as no longer servable and selects another queue among the backlogged ones, if any (lines 7–9). If at least an unbanned flow exists, the first enqueued packet belonging to this flow is selected and the scheduling variables are updated accordingly (lines 10–14). Also credit/debit counters for the originally selected flow and the substitute flow are consequently updated.