  Let $M$ be any simply-connected Gorenstein space over any field. F\'elix and
Thomas have extended to simply-connected Gorenstein spaces, the loop
(co)products of Chas and Sullivan on the homology of the free loop space
$H_*(LM)$. We describe these loop (co)products in terms of the torsion and
extension functors by developing string topology in appropriate derived
categories. As a consequence, we show that the Eilenberg-Moore spectral
sequence converging to the loop homology of a Gorenstein space admits a
multiplication and a comultiplication with shifted degree which are compatible
with the loop product and the loop coproduct of its target, respectively.
  We also define a generalized cup product on the Hochschild cohomology
$HH^*(A,A^\vee)$ of a commutative Gorenstein algebra $A$ and show that over
$\mathbb{Q}$, $HH^*(A_{PL}(M),A_{PL}(M)^\vee)$ is isomorphic as algebras to
$H_*(LM)$. Thus, when $M$ is a Poincar\'e duality space, we recover the
isomorphism of algebras $\mathbb{H}_*(LM;\mathbb{Q})^\cong
HH^*(A_{PL}(M),A_{PL}(M))$ of F\'elix and Thomas.
