Cognitive effort leads to a seeming cacophony of brain oscillations. For example, during tasks engaging working memory (WM), specific oscillatory frequency bands modulate in space and time. Despite ample data correlating such modulation to task performance, a mechanistic explanation remains elusive. We propose that flexible control of neural oscillations provides a unified mechanism for the rapid and controlled transitions between the computational operations required by WM. We show in a spiking network model that modulating the input oscillation frequency sets the network in different operating modes: rapid memory access and load is enabled by the beta-gamma oscillations, maintaining a memory while ignoring distractors by the theta, rapid memory clearance by the alpha. The various frequency bands determine the dynamic gating regimes enabling the necessary operations for WM, whose succession explains the need for the complex oscillatory brain dynamics during effortful cognition. theta band | alpha band | beta band | gamma band | selective gating A s effortful cognition unfolds multiple frequency bands of oscillations play out in the brain. However, no coherent theory exists to explain the progression of frequencies and how they relate to implementing the tasks at hand. Recently it has been speculated that individual bands may implement elementary computations constituent in cognitive tasks (1, 2) as is seen during working memory (WM) performance. Human electrophysiology studies show clearly that memory maintenance correlates positively with oscillations in the theta band (4)(5)(6)(7)(8), in the beta band (13)(14)(15)(16)(17)(18)(19)(20)(21)(22)(23)(24)(25)(26)(27)(28)(29)(30) ref. 9), and in the gamma band . On the other hand, suppression of irrelevant information is associated with oscillations in the alpha band (8)(9)(10)(11)(12)(13). In lateralized WM tasks where the subject should ignore cues in one hemifield, alpha power increases in the hemisphere encoding such irrelevant information (8,16,17). However, a mechanistic theory explaining why oscillations of various frequency bands wax and wane in time and space during effortful tasks and in particular WM remains outstanding.WM actively maintains and processes information necessary to carry out actions and decisions. WM is critically capacity limited to a handful of items "held on-line" (18,19), and operated upon in real time (20). Thus, WM requires obsolete memories to be rapidly cleared and to selectively prevent irrelevant information from being loaded. One of the central unresolved issues is how these WM operations, and in particular selective gating, are carried out by the brain circuits. Ample data (21-24) and classical theoretical arguments (25, 26) point to the selectively tuned persistent neuronal activity as the prevalent mechanism for WM storage (27)(28)(29). However, what causal role oscillatory frequency dynamics play in sustained activity and in task performance has remained unclear.We propose a resolution of these issues by constructing a comput...