# Prioritization Based Task Offloading in UAV-Assisted Edge Networks +
## 6 System Implementation
### System Components
#### 6.1.2 Network Infrastructure  
The mac80211_hwsim software is a Linux kernel module, and it can virtualize Wi-Fi network cards. Mininet-WiFi, a fork of Mininet [37], initially loads this module with the desired number of virtual wireless interfaces necessary for our system. These interfaces can be configured just like the real ones, and Mininet-WiFi automates this process. mac80211_hwsim tracks the current channel of each card's radio and copies all transmitted frames to all the operating radio within the same channel. Mininet-WiFi also benefits from wmedium, an application which allows simulating frame loss and delay by managing mac80211_hwsim from its netlink API. It has an event mechanism and adds artificial delays and failures to packet forwarding operations depending on the given channel model and radio locations. Dynamic configuration on these parameters can be performed via its socket API.  
All Wi-Fi networks are contention-based and time-division duplexing systems [38]. In wmedium, a queue mechanism is introduced to order packets to reflect delay caused by this concept. However, when multi-data transfers are performed simultaneously, it causes undesired low throughput levels even for the networks that are separated by distance or channel. There is a study on this issue that suggests a multi-threaded architecture from scratch [39]. To enable our experiments, we have developed a multi-medium mechanism on top of the existing repositories, making it possible to isolate queues of the nodes in different mediums. The new version of the application detects which nodes are talking to each other by sniffing AP-Station packet transmissions and grouping them. The code improvement also gives manual configuration ability to Mininet-WiFi end users to setup the system for advanced topologies. In our infrastructure, the average CPU usage by wmedium during simulation was no more than 25% both before and after the multi-medium development, which indicates that our extension did not cause additional overhead and there was no CPU bottleneck in both cases.  
A LoS probability-based channel model is also implemented on both Mininet-WiFi and wmedium for AP-Station interfaces while keeping the existing log distance model for mesh interfaces. Thus, the applications are run in dual channel model mode. Unfortunately, a public contribution has not yet been made because it is currently a work in progress.  
Nine APs representing UAVs and one AP representing the BS have been added to the network. UAVs are placed in a grid formation, and one of them is randomly selected for BS connection. A maximum of three separated mesh links per AP are allowed, and the links are selected by our routing algorithm, which tries to maximize bandwidth from BS to the rest of the APs after creating a minimum spanning tree with the highest link capacities. For AP-BS and AP-AP connections, Wi-Fi 802.11s mesh protocol is used. Different AP and mesh channels are assigned to the neighbor device interfaces. For the cloud server role, a Mininet host is linked to the BS AP. For the controller host role, another host is connected to the centrally positioned AP. A _localhost_ machine is also linked to the system by using the Network Address Translation (NAT) feature of Mininet for debugging purposes. The iperf3.10 tool is used for its fresh 'zero copy' feature to lower the CPU burden caused by the app. For each data transmission, server and client apps are run on the related station and host interfaces.  
\begin{table}
\begin{tabular}{c c c c c c c c} \hline \hline
**Role** & **Class** & **Proportion** & **Shape** & **Color** & **Priority** & \(\beta_{i}\) & \(S_{Q_{i}}\) \\ \hline Owner & A & 0.1 & Emergency & White & 0.7 & - & - \\ \hline Owner & B & 0.2 & Fire brigade & Red & 0.3 & - & - \\ \hline Processor & A & 0.06 & Trailer & Purple & - & 2 MBps & 100 MB \\ \hline Processor & B & 0.1 & Trailer & Cyan & - & 1.5 MBps & 70 MB \\ \hline - & - & 0.54 & Passenger & Pink & - & - & - \\ \hline \hline \end{tabular}
\end{table}
Table 5: Vehicle parameters.