Some general dynamical properties of models for compaction of granular media based on master equations are analyzed. In particular, a one-dimensional lattice model with short-ranged dynamical constraints is considered. The stationary state is consistent with Edwards theory of powders. The system is submitted to processes in which the tapping strength is monotonically increased and decreased. In such processes the behavior of the model resembles the reversible-irreversible branches which have been recently obaserved in experiments. This behavior is understood in terms of the general dynamical properties of the model, and related to the hysteresis cycles exhibited by structural glasses in thermal cycles. The existence of a normal solution, i.e., a solution of the master equation which is monotonically approached by all the other solutions, plays a fundamental role in the understanding of the hysteresis effects.