Several Ideas to Transmit Packets Efficiently
A.3 Codeword Cache
A.3.1 Thought
We encounter significant disorder of degree distribution due to the coding in intermediates.
Therefore, our task is to avoid the intermediate being probably not to encode the desired degree in a high opportunity.
At every encoding, we choose a degree randomly ddesired based on distribution. If we can’t make it, procedure will continues till the the desired one shows up. During this long encoding loop, there exists a codeword that its degree is not what we need. The quantity of these codewords will increase if we can’t produce codeword with degree dcoding matched to ddesired. If we save these codewords in the buffer, we obtain packets with various degrees except ddesired. When the next encoding cycle runs, we can firstly search in the buffer to find whether any packet in buffer with the degree matched to this new degree ddesired.
We store codewords during coding loop and we search the buffer firstly in the next
encoding cycle. The recommended way to allocate the packets in the buffer is cut buffer into separate parts according the degree distribution. Therefore, we can save searching time to find the degree.
Table A.1: Buffer allocation
Degree 1 2 3 4 ... 18 19 20
Distribution 5 4 1 1 1 1 1 5
Ratio 0.3 0.5 0.2
Buffer store 0 to 14 15 to 38 38 to 47
Table A.1 is a illustration. Max degree is 20, and every value in distribution row is the weight of particular degree. Ratio shows the percentage of total degree in three region.
Buffer size is 48 and we cut the buffer into three parts according to the percentage of the degrees in each region. We find that degrees one to three contain 30% of the distribution, therefore we cut 30% of buffer labeled from 0 to 14 to store those degrees. When we want to store a new created codeword in the buffer, we need to check the degree to put it in the relative position. The method that deal with the data is still FIFO mechanism, meaning that if this region is filled with the codewords, we overwrite it from the first position. The received data is stored by the higher priority. By doing so, packets in the buffer are updated to obtain the newly incoming information received in the buffer. Fig A.2 demonstrate the encoding flow chart.
Note that when we search the degree of packets, we choose the first one whose degree is equal to ddesired. Since we use FIFO in each sub buffer, we can lower the opportunity to send the same packet we have transmitted before. In the meantime, we create another table attached to every packets in the buffer to label whether this codeword is transmitted before.
If this packet has been transmitted, we labels it so that if the same degree is required in the next time, this packet will be skipped. At the same time, when we can not encode what require, we still have to choose one packet to deliver. In this condition, we will uniformly
Give the desired
Figure A.2: Encoding flow chart of encode and store mechanism
select one packet in the buffer and label it as identification. We illustrate labeling in Fig A.3.
Assume that node 1 has three outgoing edges and the selected ddesired is 2 for each edge with capacity 1. That means we have to send three codewords with degree 2 during the coding in node 1. B trs f lag is used for labeling and 1 represents the transmitted packet.
Table in the left side shows the information of buffer before coding. Number from 0 to 47 means the position of buffer. The second column is the labeling identification. The third column shows degree of every codeword in the buffer. Considering the coding procedure in the node 1, we need to transmit three packets. In the first cycle, drequired is 2 and we search the degree finding that there exists one packet with degree 2 in position 1 is not transmitted.
We choose this packet to transmit through edge to node 2, labeling it 1. In the next cycle, drequired is 2 again. Since packet in position 1 is labeled transmitted, we have to look for
0 0
Figure A.3: Illustration of labeling operation
the next one and we find that packet in position 2 fits in with the conditions, selecting and labeling it. In the final cycle, the drequired is still 2 and we can not find any packet after the searching so that we have to do coding to produce the codeword we desire.
A.3.2 Phenomenon
By this modification, we observe that the exclusive-or operations is decreased dramatically.
When we does not store the new encoded codewords, the number xor operations times is up to the stop bound we setup closely. It shows how tough to encode one codeword in limited information. After our modification, the average xor times to encode one codeword is down less than 10 with a constrain that stop criteria equals 5. Stop criteria means that if we can’t encode the desired codeword in 5 cycles, we quit encoding procedure and randomly chose one packet from the whole buffer.
This modification does not work. Distribution we get in the sink gets a slightly improved but its improvement is insufficient to resolve the problems to enhance the throughput. We analyze the distribution and we see that we get considerable packets with degree from D to D − 2 where D is the max degree and extraordinarily less packets with degree 1 and 2. Since we use belief propagation that number of packets with degree 1 is the vital key to decode
the whole information. We slightly balance the overall distribution but the most valuable part is still biased.
Besides, we find a fatal condition that we obtain a large quantity of the same codewords after our modification. There are two kind of steps to create repeated codewords during the coding procedure.
1. Same operation.
• Choose a set that cause equivalent combination.
• This condition occurs apparently when the buffer is spare of packets.
2. Inverse operation.
• The operation procedure is equivalent to the inverse operation of any past oper-ations.
We describe them separatively.
Fig A.4 explains the same operation. The left table is a tail part of packet recorded the relation how packets combine and we call these information degree list. Number labeled from 0 to 9 is the buffer index. Recall that we store packets based on its degree. The relation between them is in Table A.2
Table A.2: Buffer cut of example
Degree 1 2 3 4 ... 6 7 8
Buffer store 0 to 1 2 to 7 8 to 9
We demonstrate equivalent combinations after two xor operations in a encoding cycle.
Assume ddesired for this cycle is 3 and we firstly initialize the elements to 0 in degree list. In the first run, we get 0 and 4 to do computation and we get a new codeword with degree 5.