  In this paper, we present the analytical theory of attosecond pulse formation
via optical modulation of an active medium of the hydrogen-like C5+
plasma-based X-ray laser at 3.4 nm wavelength in the "water window" range,
taking into account a variation of the population inversion caused by radiative
decay of the upper lasing states. We derive an analytical solution for the
X-ray field amplified by an X-ray laser with time-dependent population
inversion, which is simultaneously irradiated by a strong optical laser field,
and use it to find the optimal conditions for the attosecond pulse formation
from a narrowband seeding X-ray field. We show that the shape of pulses can be
improved at the cost of reduced pulse peak intensity (i) via external
attenuation of the resonant spectral component of the amplified X-ray field or
(ii) by using a resonantly absorbing medium (the active medium of the X-ray
laser after the change of sign of the population inversion) for the pulse
formation. The results of the analytical theory are in a good agreement with
the numerical solutions of the Maxwell-Bloch equations which account for the
nonlinearity, as well as the amplified spontaneous emission, of the active
medium. Both analytically and numerically we show the possibility to produce a
train of attosecond pulses with sub-200 as duration and the peak intensity
exceeding 10^12 W/cm^2 at the carrier wavelength 3.4 nm in the "water window"
range, which makes them attractive for the biological and medical applications.
