This document describes the design and implementation of a small real-time operating system called USTOS for 8051 microcontrollers. USTOS supports priority-based task scheduling, nested interrupts, timers, and synchronization mechanisms using limited RAM. Context switching is implemented by pushing registers to stacks and changing the stack pointer. Interrupts are supported by tracking nesting levels and scheduling tasks on exit. Critical sections are implemented using an interrupt disable counter to prevent reenabling interrupts too early. Timers are implemented using periodic interrupts to tick a counter and wake delayed tasks.