use of OS
usually with embedded systems we need RTOS, just an OS but optimized for embedded processors, why we need it???...because not always embedded system do simple functions, especially these days embedded systems do alot of highly complex functions like embedded entertainment devices like MP5, smart phones and even PSP, so we need here an OS to organize and handle algorithms, tasks and functions, memory....etc incorporate with each other, the same the normal OS do with our 80x86 based computers.
RTOS consists of two layers, each of them can be divided to another sub-layers: generic RTOS layer and hardware abstraction layer HWAL, the generic RTOS layer is generic for most of embedded systems and it communicates with the HWAL which it is the layer responsible to handle the physical resources.
hope you find something useful in what i said.