Task centric memory management for an on-chip multiprocessor