A disk drive is disclosed comprising a disk, a head, and an actuator for
actuating the head over the disk. The disk drive further comprises a
state variable memory for storing a plurality of state variable sets,
wherein each state variable set comprises a plurality of state variables
and each state variable set corresponds to a task object. A coefficient
memory for stores a plurality of coefficient sets, wherein each
coefficient set comprises a plurality of coefficients and each
coefficient set corresponds to a task object. A task object is executed
by initializing a base state register to address a selected one of the
state variable sets in the state variable memory, and initializing a base
coefficient register to address a selected one of the coefficient sets in
the coefficient memory.