user mode
User mode is the restricted, fenced-in mode in which all ordinary programs run. Picture a guest in a building who has a key to their own apartment and may use the lobby and the shared gym, but cannot enter the boiler room, the electrical panel, or anyone else's apartment. That is your program in user mode: free to do its own work, but blocked by the hardware from any action that could harm the machine or other programs.
When the CPU is in user mode, the program may execute normal instructions — arithmetic, moving data, calling its own functions — and it may access only the memory the OS has granted to it. What it may not do is run privileged instructions: it cannot directly command devices, change the memory-protection settings, halt the CPU, or disable interrupts. If it tries, the hardware refuses and traps into the kernel. To get anything privileged done, a user-mode program must ask politely through a system call, which is the only sanctioned way to cross into the kernel. The term user space is the common name for the world of user-mode programs and the memory they live in.
Living in user mode is exactly what makes a program safe to run alongside others. A crash or a bug in user mode is contained: the OS can detect it, clean up, and kill the program without taking down the system. This containment is so valuable that designers push as much as possible into user mode — many device drivers, file systems, and services run in user space on some systems specifically so a fault stays isolated, at the cost of more frequent (and slower) crossings into the kernel.
A spreadsheet adds up a column entirely in user mode — pure arithmetic, no privilege needed. Only when you click Save does it cross into the kernel via a write() system call, because writing to disk is a privileged operation the kernel must perform on its behalf.
Ordinary work stays in user mode; only privileged work crosses into the kernel.
Running in user mode does not mean a program is harmless — it can still misuse the data and permissions it legitimately has. User mode limits what the hardware lets a program touch directly, not what mischief it can do within its own rights.