  We study a driven harmonic oscillator operating an Otto cycle between two
thermal baths of finite size. By making extensive use of the tools of Gaussian
quantum mechanics, we directly simulate the dynamics of the engine as a whole,
without the need to make any approximations. This allows us to understand the
non-equilibrium thermodynamics of the engine not only from the perspective of
the working medium, but also as it is seen from the thermal baths' standpoint.
For sufficiently large baths, our engine is capable of running a number of
ideal cycles, delivering finite power while operating very close to maximal
efficiency. Thereafter, having traversed the baths, the perturbations created
by the interaction abruptly deteriorate the engine's performance. We
additionally study the correlations generated in the system, and relate the
buildup of working medium-baths and bath-bath correlations to the degradation
of the engine's performance over the course of many cycles.
