Working memory is responsible for the temporary manipulation and storage of information to support reasoning, learning and comprehension in the human brain. Background oscillations from subcortical structures may drive a gating or switching mechanism during working memory computations, and different frequency bands may be associated with different processes while working memory tasks are performed. There are three well-known relationships between working memory processes and specific frequency bands of subcortical oscillations, namely: the storage of new information which correlates positively with beta/gamma-frequency band oscillations, the maintenance of information while ignoring irrelevant stimulation which is directly linked to theta-frequency band oscillations, and the clearance of memory which is associated with alpha-frequency band oscillations. Although these relationships between working memory processes and subcortical background oscillations have been observed, a full explanation of these phenomena is still needed. This paper will aid understanding of the working memory's operation and phase switching by proposing a novel and biophysical realistic mathematical-computational framework which unifies the generation of subcortical background oscillations, the role of basal ganglia-thalamo-cortical circuits and the influence of dopamine in the selection of working memory operations and phases: this has never been attempted before.