Hardware setup used in chapter 3 for data capture were contributed by Carlos Moreno, who also contributed his ideas, reviews, and suggestions. All the work presented in this thesis were completed under the supervision of Professor Sebastian Fischmeister in the ECE department at the University of Waterloo, who contributed with his ideas, reviews, and suggestions.iii Abstract System tracing, runtime monitoring, execution reconstruction are useful techniques for protecting the safety and integrity of systems. Furthermore, with time-aware or overheadaware techniques being available, these techniques can also be used to monitor and secure production systems. As operating systems gain in popularity, even in deeply embedded systems, these techniques face the challenge to support multi-tasking.In this thesis, we propose a novel non-intrusive technique, which efficiently reconstructs the execution trace of non-preemptive multitasking system by observing power consumption characteristics. Our technique uses the Control flow Graph (CFG) of the application program to identify the most likely block of code that the system is executing at any given point in time. For the purpose of the experimental evaluation, we first instrument the source code to obtain power consumption information of each Basic Block (BB), which is used as the training data for our Dynamic Time Warping (DTW) and k-Nearest Neighbors (k-NN) classifier. Once the system is trained, this technique is used to identify live code-block execution (LCBE). We show that the technique can reconstruct the execution flow of programs in a multi-tasking environment with high accuracy. To aid the classification process, we analyze eight widely used machine learning algorithms with time-series power-traces data and show the comparison of time and computational resources for all the algorithms. iv Acknowledgements Past twenty-eight months has been a period of intense learning for me, not only in the area of my research but also on a personal level. I would like to extend my gratitude to the people who have supported me throughout this period.First and foremost I would like to express my gratitude to my supervisor Dr. Sebastian Fischmeister for his continuous guidance, inspiration, suggestions, and all the opportunitites I was given. Thank you for believing in me.Secondly, I would like to extend my words of sincere appreciation to Dr. Carlos Moreno who has provided excellent guidance and support throughout this period. Big thanks!! to you for your patience; it was a great honor and a tremendous learning opportunity working with you.