  The freshness of information in real-time monitoring systems has received
increasing attention, with Age of Information (AoI) emerging as a novel metric
for measuring information freshness. In many applications, update packets need
to be computed before being delivered to a destination. Mobile edge computing
(MEC) is a promising approach for efficiently accomplishing the computing
process, where the transmission process and computation process are coupled,
jointly affecting freshness. In this paper, we aim to minimize the average peak
AoI (PAoI) in an MEC system. We consider the generate-at-will source model and
study when to generate a new update in two edge server setups: 1) computing
preemption, where the packet in the computing process will be preempted by the
newly arrived one, and 2) non-preemption, where the newly arrived packet will
wait in the queue until the current one completes computing. We prove that the
fixed threshold policy is optimal in a non-preemptive system for arbitrary
transmission time and computation time distributions. In a preemptive system,
we show that the transmission-aware threshold policy is optimal when the
computing time follows an exponential distribution. Our numerical simulation
results not only validate the theoretical findings but also demonstrate that:
1) in our problem, preemptive systems are not always superior to non-preemptive
systems, even with exponential distribution, and 2) as the ratio of the mean
transmission time to the mean computation time increases, the optimal threshold
increases in preemptive systems but decreases in non-preemptive systems.
