How is the oxygen supplied for civil aviation aircraft?

When the plane flies above 4268 meters, it is necessary to pressurize the cockpit. If the pressure in the cockpit is lost, it will cause hypoxia, and passengers will be dizzy or even unconscious, even life-threatening. In the case of air leakage in the cockpit at different altitudes, the hypoxia time that people can bear is 6 100 m 10 min, 7,800 m 2 min, 9 140 m 30 sec,10,700 m 20 sec and12,200 sec respectively. Oxygen mask is an emergency life-saving equipment to provide oxygen for passengers. When the cockpit of an aircraft is threatened, the oxygen mask will automatically fall from the top of the cabin. Passengers should carry oxygen masks with them until the plane drops below the safe breathing altitude. Every flight has enough oxygen masks, that is, every passenger is equipped with one, and each row of seats is equipped with an extra pair of spare masks in case of accidents.