  The spin dynamics of localized donor-bound electrons interacting with the
nuclear spin ensemble in $n$-doped GaAs epilayers is studied using nuclear spin
polarization by light with modulated circular polarization. We show that the
observed build-up of the nuclear spin polarization is a result of competition
between nuclear spin cooling and nuclear spin warm-up in the oscillating Knight
field. The developed model allows us to explain the dependence of nuclear spin
polarization on the modulation frequency and to estimate the equilibration time
of the nuclear spin system that appears to be shorter than the transverse
relaxation time $T_2$ determined from nuclear magnetic resonance.
