For openers, these terms, "inflation" and "deflation" are misused. Inflation is an inflating of the currency - growing the numbers of the currency unit without any additional wealth to back that currency.
Prices can rise or fall not related to inflation. A crop failure will cause food prices to explode; and the cost-of-living index to rise. Not inflation - it's a reduction in national wealth; the same people with the same dollars chasing fewer and more-scarce foodstuffs.
Oil, also. A spike in the rise of crude oil prices causes the price of EVERYTHING to rise. Not inflation - it's a reduction in our standard of living because the OPEC sheikhs are raping us.
But the dollars in circulation haven't changed.
Well, this time they did. Through Quantitative Easing, more dollars have been injected into the system. When you pay more for oil, that dollar buys less of it. At 42 dollars a barrel, $1 buys one gallon of crude. At $21, the value of your money is doubled, at $84/bbl, it takes two dollars to buy that same gallon of crude oil.
The reserve currency for oil trading is the US dollar. It is the monetary unit oil is priced in, and the unit used to buy oil. If there is any commodity our dollar is pegged to in value, that's it, but the price is volatile, the commodity is consumed more or produced more depending on price.
When oil prices are high, more dollars end up in the hands of oil producers. Now that we can export oil, we are able, theoretically, to take advantage of those higher prices and recover some of those dollars abroad. But the bugaboo in that is that when prices are high, it usually means a shortage of marginal capacity globally, and only recently have we demonstrated we are able to produce enough oil to actually cut back on imports and retain more of our dollars, if not reach the point where we were buying back our dollars with exported oil. In panic, Saudi Arabia and OPEC produced oil as fast as they could to attempt to kill off the US industry by lowering the price of oil to the point where leveraged producers would not be able to repay loans, and where those not so vulnerable would be less inclined to replace depleted production. While that has succeeded to some degree, it has hurt the Saudis, too.
Gold, too, is a commodity traded, and mining picks up when the price is up, drops off (especially on more marginal deposits) when prices are down, same as for silver and platinum group metals.
No matter what you peg the dollar to, it will be subject to price fluctuations so long as private ownership is allowed, because the demand will change.
The Gold standard required that gold mined mostly be sold to the mint (treasury) or made into jewelry (or dental work). The mint 'monetized' that gold as they did silver, by minting coins of it, to represent a fraction of the statutory stated value of Gold. Not being an openly traded commodity, price fluctuations did not occur except by law. The price was fixed.
The last time the metal was called in (coin and any bullion were to be redeemed for paper money, and that included Gold Certificates which had been redeemable in gold, after the collection of all but numismatic (collector coins), Jewelry, orstock to make jewelry and the like, the price was changed. That could happen again. I would expect rampant noncompliance with collection, perhaps more than there was in the '30s when gold coins were still used as legal tender, and silver coins were common (0.78 oz. silver to the dollar, whether in dimes, quarters, halves, or a dollar).
Prices can fall, too...although they seldom do because seldom do governments want to retract the numbers of the currency. But it can happen and CREDITORS benefit. The dollars paid back to banks are worth more than the dollars borrowed. Deflation.
A precious-metal standard prevents BOTH inflation and deflation.
Prices fall with lowered demand or increased supply. In the case of food, gold, silver, oil, that applies because they are openly traded commodities.
Only putting the gold genie back in the bottle, ending open trading again, and fixing the price by law will change that.