A cost analysis framework for multi-core systems with spares