The authors consider M/G/1/N queues with generalized vacations and exhaustive service, where arrival rates depend on the number of customers in the system. An efficient recursive algorithm with overall computational complexity O(N2) for computing the exact stationary queue length distribution is developed. Based on the stationary queue length distribution, some other performance characteristics such as the Laplace transform of busy period and moments of virtual waiting time at arbitrary time can be obtained. The present numerical investigations demonstrate the strength of the algorithm.