A runtime heuristic to selectively replicate tasks for application-specific reliability targets