/ˈjuːzərˌspeɪs/
在计算机系统(尤其是类 Unix/Linux)中,“userspace(用户空间)”指应用程序与普通用户进程运行的环境与内存区域,与拥有更高权限、直接管理硬件与系统资源的 kernel space(内核空间) 相对。用户空间程序通常不能直接访问硬件,需要通过系统调用与内核交互。(该词也常写作 user space。)
I wrote a small tool in userspace to monitor CPU usage.
我在用户空间写了一个小工具来监控 CPU 使用率。
Drivers often split work between the kernel and userspace to improve safety and flexibility, communicating through system calls or device files.
驱动程序常把工作分在内核与用户空间以提升安全性与灵活性,并通过系统调用或设备文件进行通信。
由 user(用户)+ space(空间) 组合而成,是计算机操作系统领域的术语。“space”在这里指“运行环境/地址空间”。随着现代操作系统对权限隔离与安全性的强调,“用户空间 vs 内核空间”的对比成为常见表述。