  Reliability, longevity, availability, and deadline guarantees are the four
most important metrics to measure the QoS of long-running safety-critical
real-time applications. Software aging is one of the major factors that impact
the safety of long-running real-time applications as the degraded performance
and increased failure rate caused by software aging can lead to deadline
missing and catastrophic consequences. Software rejuvenation is one of the most
commonly used approaches to handle issues caused by software aging. In this
paper, we study the optimal time when software rejuvenation shall take place so
that the system's reliability, longevity, and availability are maximized, and
application delays caused by software rejuvenation is minimized. In particular,
we formally analyze the relationships between software rejuvenation frequency
and system reliability, longevity, and availability. Based on the theoretic
analysis, we develop approaches to maximizing system reliability, longevity,
and availability, and use simulation to evaluate the developed approaches. In
addition, we design the MIN-DELAY semi-priority-driven scheduling algorithm to
minimize application delays caused by rejuvenation processes. The simulation
experiments show that the developed semi-priority-driven scheduling algorithm
reduces application delays by 9.01% and 14.24% over the earliest deadline first
(EDF) and least release time (LRT) scheduling algorithms, respectively.
