On entropy production in a stochastic model of open systems