This study aimed to investigate the underlying processes of the development of cognitive flexibility between childhood and young adulthood. We performed a diffusion model analysis on the reaction time and accuracy data from four age groups (7-, 11-, 15-, and 21-year-olds), who performed a task-switching task. We decomposed the data into processes related to the reconfiguration of the cognitive system to a new goal (i.e., task-set reconfiguration) and processes related to the interference of the previous task (i.e., task-set inertia). The developmental patterns of both processes indicated a relatively early maturing mechanism, associated with task-set inertia, and a later maturing mechanism, relating to task-set reconfiguration. This pattern of results was interpreted in terms of the development of the neural mechanisms involved in task switching, that is, the (pre-)supplementary motor area and the ventrolateral prefrontal cortex. © 2014 Elsevier Inc.