Thermal-Aware Design and Runtime Management of 3D Stacked Multiprocessors