Improving Scalability and Per-Core Performance in Multi-Cores through Resource Sharing and Reconfiguration