In a fixed spectral range, single- and half-cycle electromagnetic pulses have the shortest duration. Half-cycle pulses are promising tools for ultrafast control of quantum systems. Previously, the possibility of using a sequence of single- and half-cycle attosecond pulses to generate and ultrafast control light-induced population difference gratings has been demonstrated. However, such studies have been carried out using different approximations, such as the sudden perturbation theory and the two-level model for the resonant medium. In this paper, based on the numerical solution of constitutive equations for elements of the density matrix and wave equation it is shown that it is possible to generate and control population gratings in a three-level medium without using the approximation of sudden perturbations used in previous studies. It is shown that taking into account the additional level of the medium does not lead to a violation of the effect of generating such gratings. This extends the applicability of previous results.