A simple mathematical model of (time-varying), program demand for main memory is developed. The model is based on the use of the immigration-death process, and is particularly suited to modeling the total demand of several programs. The goal is to study the behavior of the system under various schemes of dynamically allocating main memory among the programs. In particular, given some sort of working-set storage management we study what margin of free space should be reserved when programs are moved in and out of main memory, so that the frequency of overflow-underflow events is kept reasonably low, while at the same time maintaining a reasonably high degree of multiprogrammig.