  We study an M/G/1-type queueing model with the following additional feature.
The server works continuously, at fixed speed, even if there are no service
requirements. In the latter case, it is building up inventory, which can be
interpreted as negative workload. At random times, with an intensity
{\omega}(x) when the inventory is at level x > 0, the present inventory is
removed, instantaneously reducing the inventory to zero. We study the
steady-state distribution of the (positive and negative) workload levels for
the cases {\omega}(x) is constant and {\omega}(x) = ax. The key tool is the
Wiener-Hopf factorisation technique. When {\omega}(x) is constant, no specific
assumptions will be made on the service requirement distribution. However, in
the linear case, we need some algebraic hypotheses concerning the
Laplace-Stieltjes transform of the service requirement distribution. Throughout
the paper, we also study a closely related model coming from insurance risk
theory. Keywords: M/G/1 queue, Cramer-Lundberg insurance risk model, workload,
inventory, ruin probability, Wiener-Hopf technique. 2010 Mathematics Subject
Classification: 60K25, 90B22, 91B30, 47A68.
