We consider a processing system, composed of several parallel queues and a processor, which operates in a time-varying environment that fluctuates between various states or modes. The service rate at each queue depends on the processor bandwidth allocated to it, as well as the environment mode. Each queue is driven by a job traffic flow, which may also depend on the environment mode. Dynamic processor scheduling policies are investigated for maximizing the system throughput, by adapting to queue backlogs and the environment mode. We show that allocating the processor bandwidth to the queues, so as to maximize the projection of the service rate vector onto a linear function of the workload vector, can keep the system stable under the maximum possible traffic load. The analysis of the system dynamics is first done under very general assumptions, addressing rate stability and flow conservation on individual traffic and environment evolution traces. The connection with stochastic stability is later discussed for stationary and ergodic traffic and environment processes. Various extensions to feed-forward networks of such nodes, the multi-processor case, etc., are also discussed. The approach advances the methodology of trace-based modelling of queueing structures. Applications of the model include bandwidth allocation in wireless channels with fluctuating interference and allocation of switching bandwidth to traffic flows in communication networks with fluctuating congestion levels.