Cost-Effective Analysis of Software Systems with Periodic Rejuvenation