  We study a model thin film containing diluted bilayer structure with the RKKY
long-range interaction. The magnetic subsystem is composed of two magnetically
doped layers, separated by an undoped nonmagnetic spacer and placed inside a
wider film modelled by a quantum well of infinite depth. We focus our study on
the range of parameters for which the antiferromagnetic coupling between the
magnetic layers can be expected. The critical temperatures for such system are
found and their dependence on magnetic layer thickness and charge carriers
concentration is discussed. The magnetization distribution within each magnetic
layer is calculated as a function of layer thickness. The external field
required to switch the mutual orientation of layer magnetizations from
antiferromagnetic to ferromagnetic state is also discussed.
