Reaction of magnesium with oxygen