  A diathermal wall between two heat baths at different temperatures can be
mimicked by a layer of independent spin pairs with some internal energy and
where each spin $\sigma_a$ is flipped by thermostat $a$ ($a=1,2$). The
transition rates are determined from the modified detailed balance discussed in
Ref.[1]. Generalized heat capacities, excess heats, the housekeeping entropy
flow and the thermal conductivity in the steady state are calculated. The joint
probability distribution of the heat cumulated exchanges at any time is
computed explicitly. We obtain the large deviation function of heat transfer
via a variety of approaches. In particular, by a saddle-point method performed
accurately, we obtain the explicit expressions not only of the large deviation
function, but also of the amplitude prefactor, in the long-time probability
density for the heat current. The following physical properties are discussed :
the effects of typical time scales of the mesoscopic dynamics which do not
appear in equilibrium statistical averages and the limit of strict energy
dissipation towards a thermostat when its temperature goes to zero. We also
derive some properties of the fluctuations in the two-spin system viewed as a
thermal machine performing cycles.
