The respiratory system includes the nose, pharynx, larynx, trachea, bronchi, and lungs. Gas exchange occurs in the alveoli of the lungs where oxygen enters the blood and carbon dioxide leaves. Inspiration is an active process involving contraction of the diaphragm and intercostal muscles which increases the thoracic cavity volume. Expiration is usually a passive process involving relaxation of these muscles and elastic recoil of the lungs. The respiratory centers in the medulla control breathing rhythm and depth via nervous and chemical feedback mechanisms.