What is the difference between commands used in OS and RTOS?

This is not an easy question to answer because every (commercial) RTOS or OS will have a somewhat different structure and different application programming interface (API).

In general, OSes and RTOSes will function similarly in some respects. Each must abstract the processor, provide some data passing capability, allow the scheduling of operations (or tasks), manage memory, etc.

The primary difference is that an RTOS is designed for real-time, deterministic behavior. That means that the highest priority task that is ready to run gets control of the processor. All other operations must give up processor control until that task finishes and releases the processor (then the next task with the highest priority will run.) Such a deterministic environment is critical for systems that must have predictable behavior (unlike PCs).

Historically, RTOSes were intended for "deeply embedded" applications where the system had a narrow, tightly defined purpose (like an engine control system). In such a system, the developer has complete control over what software will run on the system and how the system should behave in various situations.

General purpose OSes were developed for personal computers designed to support multiple, general purpose applications. The system developer must be prepared for a wide range of diverse software to run on the system. He cannot control what will software will run or how often. A key role for the OS is to establish an environment where all of this third party software can cohabitate.