  Multi-Access Edge Computing (MEC) is widely recognized as an essential
enabler for applications that necessitate minimal latency. However, the dropped
task ratio metric has not been studied thoroughly in literature. Neglecting
this metric can potentially reduce the system's capability to effectively
manage tasks, leading to an increase in the number of eliminated or unprocessed
tasks. This paper presents a 5G-MEC task offloading scenario with a focus on
minimizing the dropped task ratio, computational latency, and communication
latency. We employ Mixed Integer Linear Programming (MILP), Particle Swarm
Optimization (PSO), and Genetic Algorithm (GA) to optimize the latency and
dropped task ratio. We conduct an analysis on how the quantity of tasks and
User Equipment (UE) impacts the ratio of dropped tasks and the latency. The
tasks that are generated by UEs are classified into two categories: urgent
tasks and non-urgent tasks. The UEs with urgent tasks are prioritized in
processing to ensure a zero-dropped task ratio. Our proposed method improves
the performance of the baseline methods, First Come First Serve (FCFS) and
Shortest Task First (STF), in the context of 5G-MEC task offloading. Under the
MILP-based approach, the latency is reduced by approximately 55% compared to GA
and 35% compared to PSO. The dropped task ratio under the MILP-based approach
is reduced by approximately 70% compared to GA and by 40% compared to PSO.
