  The aim of the present paper is to use quasi-periodic oscillations in hard
X-rays (HXRs) of solar flares as a diagnostic tool for investigation of
impulsive electron acceleration. We have selected a number of flares which
showed quasi-periodic oscillations in hard X-rays and their loop-top sources
could be easily recognized in HXR images. We have considered MHD standing waves
to explain the observed HXR oscillations. We interpret these HXR oscillations
as being due to oscillations of magnetic traps within cusp-like magnetic
structures. This is confirmed by a good correlation between periods of the
oscillations and the sizes of the loop-top sources. We argue that a model of
oscillating magnetic traps is adequate to explain the observations. During the
compressions of a trap particles are accelerated, but during its expansions
plasma, coming from chromospheric evaporation, fills the trap, which explains
the large number of electrons being accelerated during a sequence of strong
impulses. The advantage of our model of oscillating magnetic traps is that it
can explain both the impulses of electron acceleration and quasi-periodicity of
their distribution in time.
