Not to want to disagree with prior definitions of RTOS but I think being an old fart that I can give another definition more from a historical basis.
Early computer operating systems worked mostly in a "Batch" environment. User jobs were processed sequentially one at a time, having to wait their turn for execution. Application programs would be loaded, run and then dumped for the next job by the OS job scheduler. Typically the OS could only run one user program at a time.
As computers became more powerful and useful for more applications there became a need for operating systems that could execute many user programs already loaded into memory, in a more flexible and timely matter. Such RTOS could load programs and assigned them a priority level that would ensure that they would execute when required to respond to external interrupts or when hardware services became available to them, otherwise they were just given a time slice for normal execution depending on their priority.
Later there was a term coined 'deterministic' to describe an OS systems that could guarantee a certain response time for any specific applications. This I think is a good current definition of a RTOS.
Lefty