In this paper we examine the inner workings of a real-time kernel. By understanding internals, you will have a better grasp on the issues involved when using a kernel. This paper uses a combination of code, graphics, animations, and running examples on an actual target CPU to show you how a kernel works. You will see how a scheduler, a context switch, and many other common kernel services are typically implemented.