A context controller for managing multitasking in a processor and a method of
operating
the same. In one embodiment, the context controller includes: (1) a time slice
instruction counter that counts a number of instructions executed with respect
to a given background task and (2) a background task controller that cyclicly executes
a context corresponding to another background task when the number of instructions
executed equals a dynamically-programmable time slice value.