# Adaptive Computation Offloading with Task Scheduling Minimizing Reallocation in VANETs
## 1 Introduction
VAO in an RV first collects the nearby vehicle information in real time, then allocates tasks to some of the neighbors so that the overall application can be completed as quickly as possible. Usually, the most computationally intensive task is assigned to the vehicle with the best computation power. The allocation of tasks is not the end of the VAO operation. If any SV moves at a different speed, or in a different direction, from the RV, the SV may leave the communication range of the RV before completing its allocated task. In this case, the allocated task must be retrieved and reassigned to another vehicle. Then, the more task reallocation occurs, the longer the total execution time of the application usually is. So, the task allocation that can reduce the chance of reallocation is performed by VAO. For performance evaluation, we conducted a series of simulations using the Veins simulator [6]. In terms of the schedule length (or the completion time of the application), VAO outperformed the existing task scheduling methods, HEFT [7] and Max-Min [8], by 14.4%. The task reallocation of VAO was also reduced by 45.4%. The main contributions of this paper are as follows:  
To the best of our knowledge, VAO is the first CO method to apply DAG scheduling to dynamic vehicular environments. The proposed VAO can smoothly reallocate partial tasks for the completion of the whole workflow when an SV is out of the range of an RV. While HEFT and Max-Min are used only for static servers or processors, VAO ensures these scheduling algorithms deal with expected disconnection caused by velocity difference. Before moving on to the next section, let us answer a question that many people ask about vehicle-to-vehicle (V2V) computation offloading: _Why does an SV provide the service to an RV?_ Firstly, a single vehicle may not run the latest VANET applications alone. For example, object recognition-based driving assistance software can reduce blind spots and help in changing lanes, joining lanes and keeping distance safe [9; 10; 11], but it requires excessive computation from a single vehicle. If this kind of software can be run successfully through cooperation between vehicles and the object recognition result is shared between RVs and SVs, driving safety can be greatly improved. Secondly, SVs might get a direct reward for providing services. For instance, blockchain or non-fungible token (NFT) technology can be used to create non-manipulable incentives to reward SVs. Since further discussion on blockchain and NFT is beyond the scope of this paper, we just assume that every vehicle in this paper is willing to cooperate with other vehicles. The rest of the paper is organized as follows. In Section 2, related works on computation offloading and task scheduling are briefly overviewed. Section 3 presents the system model and Section 4 covers the numerical method to find the near-optimal task schedule in a static environment. The proposed VAO for a dynamic circumstance like VANET is described in detail in Section 5, and the simulation results are given in Section 6. Section 7 concludes this paper.