This document discusses real-time operating systems (RTOS), focusing on principles and a case study of EMERALDS, an RTOS designed for small memory embedded systems. It describes the requirements and classifications of RTOSs, approaches to minimizing code size and execution overhead in EMERALDS, and how EMERALDS implements efficient real-time scheduling, semaphores, message passing and memory protection for constrained embedded devices. The document also discusses how EMERALDS was adapted to the OSEK standard for automotive systems.