The increase in power density for both the CPU and memory systems makes the implementation of effective thermal management mechanisms that can deal with the heat generated not only from CPU but also from memory necessary. While many thermal management techniques have been proposed, most of them focus exclusively on either CPU or memory. Moreover, most of such techniques are on-line reactive in nature, which threatens the predictability of real-time systems. In this paper, we study the problem of how to guarantee timing constraints for hard real-time systems under CPU and memory thermal constraints. Our approach takes advantage of the periodic resource model for its hard deadline guarantee capability and in the meantime, by periodically (deterministically) throttling the accesses of the CPU and memory resources, our approach can effectively guarantee the thermal constraints for both the CPU and memory. Our experimental results clearly demonstrate the effectiveness of our proposed approach in reducing the peak temperature as well as the need to take both the CPU and memory systems into consideration simultaneously for system-level thermal management.