Gas exchange and pulmonary ventilation