What is the oxidation mechanism of gunpowder? I've been recently looking into fireworks and the chemistry of explosives, and I found out that, amongst others, one of the most important reactions in gunpowder ignition is the oxidation of charcoal and sulfur by $\mathrm{KNO_3(s)}$. I am curious as to whether it is known if this reaction occurs between charcoal/sulfur and solid state potassium nitrate or if the potassium nitrate decomposes first and the reaction occurs via gaseous oxygen as an intermediate.

Is there a general mechanism of oxidation between solid oxidizing salts and organic matter/sulfur? Does the same thing happen with $\mathrm{KClO_3(s)}$ or $\mathrm{KMnO_4(s)}$ for example?
$\mathrm{KNO_3(s)}$ can oxidize charcoal without sulfur. It needs a "hot" primer through to get the reaction started.  Sulfur's role is to lessen the ignition temperature. 

See section in Wikipedia article.

Since the reaction isn't complete and has a number of possible products bthere isn't an exact chemical formula for black gunpowder burning. The Wikipedia article lists several approximations to black gunpowder burning. What is supposedly the best follows. 


  
    Although charcoal's chemical formula varies, it can be best summed up by its empirical formula: $\ce{C7H4O}$. Therefore, an even more accurate equation of the decomposition of regular black powder with the use of sulfur can be described as:
    $\ce{KNO3 + C7H4O + 2S → K2CO3 + K2SO4 + K2S + 4CO2 + 2CO + 2H2O + 3N2}$