  We consider a mesoscopic mechanism of the exchange interaction in a system of
alternating ferromagnetic/nonmagnetic metallic layers. In the case of small
mesoscopic samples the sign and the amplitude of the exchange energy turn out
to be random sample specific quantities. They can be changed by applying an
external magnetic field, by attaching to the system superconducting electrodes
with different phases of the superconducting order parameter and by changing
the chemical potential of electrons in the matal with the help of a gate. In
the case of square or cubic geometries of the nonmagnetic layer at low
temperature the variance of the exchange energy turns out to be sample size
independent.
