Theory of Resource Allocation for Robust Distributed Computing: An Age-dependent Regeneration Approach