Quantum Oscillations in Gapped Systems