Cardiopulmonary resuscitation (CPR) is a commonly used procedure and plays a critical role in saving the lives of patients suffering from cardiac arrest. This paper is concerned with the design of a dynamic technique to optimize the performance of CPR and to consequently improve its outcome, the survival rate. Current American Heart Association (AHA) guidelines treat CPR as a static procedure with fixed parameters. These guidelines set fixed values for CPR parameters such as compression to ventilation ratio, chest compression depth, etc., with an implicit assumption that they are somehow "optimal," which has not been really substantiated. In this study, in a quest to improve this oft-used procedure, an interactive technique has been developed for dynamically changing the CPR parameters. Total blood gas delivery which is combination of systemic oxygen delivery and carbon dioxide delivery to the lungs has been defined as the objective function, and a sequential optimization procedure has been explored to optimize the objective function by dynamically adjusting the CPR parameters. The results of comparison between the sequential optimization procedure and the global optimization procedure show that the sequential optimization procedure could significantly enhance the effectiveness of CPR.