dependent tasks clustering and allocation