An analytical description of strictly periodic shock waves passing through a stellar atmosphere is developed which allows predictions to be made of the onset of instability of the system against mass loss by hydrodynamic ejection. This diagnostic method for determining when shock-driven mass loss may be expected is compared to several numerical isothermal hydrodynamical models. The predictions by the analytical theory of the onset of mass loss are in good agreement with the numerical hydrodynamical models. The role of random aperiodicities in enhancing mass loss is investigated in the numerical models and is found to be minor. Effects of atmospheric density gradients and postshock heating are also investigated numerically and are found to be critical. We conclude that the observed mass loss rates for the long-period variables can be produced by the shock wave mechanism alone if proper account is taken of the high pressures in the hot postshock hydrogen recombination zone.