## 5 Performance Evaluation
### Results and Discussion
Figure 5 shows the number of accumulated tasks processed by fog nodes. The results show that the proposed knapsack-based \(ETE_{FN}\) assists fog nodes process all high-priority tasks until the number of tasks reach 25 out of 234 of the 325 processed high-priority tasks at which point the number of high-priority tasks is gradually increased to 55. On the other hand, all three schemes execute a lower number of high-priority tasks. For medium-priority tasks, \(ETE_{FN}\) helps the fog node process more tasks compared to the other three schemes in each processing cycle when the number of offloaded tasks is within the range of 20. However, processing tasks in the proposed scheme are less than the other three schemes when number of tasks increases from this limit. This is due to the fact that \(ETE_{FN}\) intelligently scrutinizes the tasks for task execution. For low-priority task results, the number of offloaded tasks processed by \(ETE_{FN}\) is far less than the other three schemes because \(ETE_{FN}\) does not process any of the low-priority tasks because it has already processed most of the high-priority tasks by applying the 0/1 knapsack algorithm. Results shown in Figure 6 verify that the fog node performs 100% of offloaded high-priority tasks in \(ETE_{FN}\) when the number of tasks is 25 compared to 91%, 38% and 0% of tasks for STF, FCFS and LTF, respectively. When the number of tasks is increased to 55 with an increase of 5 tasks in each cycle, an overall 72% of high-priority tasks are processed compared to 66%, 21% and 0% of high-priority tasks for STF, FCFS and LTF, respectively. For medium-priority tasks, for the initial 10 tasks, the proposed scheme is 100%, more than the rest of the other three schemes. However, for low-priority tasks, the number of processed tasks in \(ETE_{FN}\) is less than all three schemes and the processed tasks are at 10% compared to 20%, 70% and 90% of tasks in STF, FCFS and LTF, respectively. Figure 7 analyzes the task completion time of \(ETE_{FN}\) compared to the other three schemes. The total task processing time is defined as the total time required to download the processed task by vehicles from the fog node or from the cloud server. The total processing time is the sum of all processed tasks downloading time of vehicles by adding the previous processing time to current processing time. The results show that the task completion time for high-priority tasks in \(ETE_{FN}\) is much less than in STF, FCFS3 and LJF because the majority of these tasks are processed by the fog node itself, and only a few are  
Figure 5: Number of tasks performed by fog nodes for varying number of tasks. forwarded to the cloud. However, accumulated task execution time for low-priority tasks is higher than the rest of the scheme because most of these tasks are forwarded to the cloud for task processing. It is evident from the results that our proposed scheme accommodates most of the highest priority tasks as compared to all other competitive schemes for varying numbers of processing cycles and for varying tasks in each processing cycle. This results in reduced  
Figure 6: Percentage of tasks performed by fog nodes for varying number of tasks. Figure 7: Accumulated processing task time for different processing cycles. execution time for the highest priority offloaded tasks as it allows the fog node to execute most of these tasks within its processing capacity.