An efficient locality-aware task assignment algorithm for minimizing shared cache contention