The unsigned int is typecast into the signed value.
The volatile keyword is used to represent variables that point to memory in other mapped devices. In such a case the value of the variable can be changed outside of a program. The compiler does not do additional optimizations to the code if there is volatile keyword.
Embedded system is just combination of s/w and h/w that is some embedded sys may have os some may not and rtos is an os.