Pulmonary ventilation functions to maintain favorable concentrations of oxygen and carbon dioxide in the alveoli during rest and exercise. Inspiration occurs when intrapulmonary pressure is reduced below atmospheric pressure through contraction of inspiratory muscles, while expiration is usually a passive process at rest but involves expiratory muscles during exercise. Pulmonary ventilation, measured as minute ventilation, ensures complete gas exchange before blood leaves the lungs for transport throughout the body.