System-Level Thermal Modeling And Management For Multi-Core And 3D Microprocessors