The level of oxygen present in mammalian blood - critical for survival - is controlled by a complex feedback system triggering increased or decreased breathing, and alterations in blood pressure etc.. It's dependent on 'sensors', one primary sensor is called the Carotid Body.
Oxygen (O2) sensing by the carotid body and its chemosensory reflex is critical for homeostatic regulation of breathing and blood pressure."
Source : Wikipedia
However, the molecular mechanisms for detecting variations in oxygen partial pressure have yet to be identified. There may be multiple mechanisms, and they could vary between species.
Further reading on O2 regulation: Oxygen sensors in context Biochimica et Biophysica Acta (BBA) - Bioenergetics Volume 1777, Issue 1, January 2008, Pages 1–14
Also see : Respiratory rhythmplugin-autotooltip__plain plugin-autotooltip_bigRespiratory rhythm
The neural regulators and feedback mechanisms which control the rhythmic nature of breathing in mammals (and many other organisms) are currently the subject of intense research.
"Mammalian central pattern generators producing rhythmic movements exhibit robust but flexible behavior.
Importance Rating