由于任意工作量的一个线程或进程的上下文切换涉及到的开销较大,小粒度级的系统往往效率低下且遭遇低性能问题。
Due to the overhead involved in context switching to a thread or process for any amount of work, systems with small-scope granularity are often inefficient and suffer from low performance.
现代操作系统通常在进程调度方面表现得很出色,从而最大程度减少了上下文切换。
Modern operating systems generally do an excellent job of process scheduling, which minimizes context switching.
mkdir系统调用用来创建这个上下文,用户进程然后可以打开这个目录中相关的文件。
The mkdir system call creates the context, and the user process can subsequently open the associated files inside that directory.
这是上一个模型的实用版本,它把访问存储系统的进程放到会话的上下文中。
This is a practical version of the previous model, where a process accesses the storage system in the context of a session.
这样就能够避免网络延迟、进程间通信的开销以及操作系统中的上下文切换,从而进一步提高速度。
This avoids network latency and the overhead of inter-process communication, as well as context switching in the operating system, further contributing to extreme speed.
操作系统通常可以在相同进程中的不同线程之间更快速地切换(上下文切换),而不是在不同进程之间切换。
Operating systems can generally switch (context switching) faster between threads of the same process than between different process.
但是,在执行上下文切换时,虽然现代操作系统表现很“出色”,却并非“完美无缺”,因为进程在每次进行上下文切换时,它都将停止运行——这将导致吞吐量出现延迟(和性能下降)。
However, "excellent" in this context is not "perfect," since each time a process is context-switched it stops operating — which then results in throughput delays (and performance degradation).
每一个重要的内核对象,比如每个文件系统对象和每个进程,都有一个关联到它们的“安全上下文(security context)”。
Every critical kernel object, such as every filesystem object and every process, has a "security context" associated with them.
内核为系统中所有的进程都维护了一个context结构体,以及要在不同进程之间有效进行上下文切换所需要的信息。
The kernel maintains a context structure for all the processes in the system, information it needs for effective context switching among different processes.
任何多任务操作系统的本质部分,内核仅仅包含调度程序和上下文切换进程。
An essential part of any multitasking operating system, the kernel contains just the scheduler and context-switch routine.
固化进程只适用于系统服务进程,例如文件服务,窗口服务等。因为绝大多数的上下文切换都包括了三个步骤。
Fixed processes are suitable only for system server processes such as the file server, window server etc. since the majority of context switches involve these processes.
当前上下文不支持系统事件通知。例如,服务器进程可能不支持全局系统事件通知。
System event notifications are not supported under the current context. Server processes, for example, may not support global system event notification.
在大多数的系统中,当创建了上千个进程时,系统性能将大幅降低,因为超负荷的上下文切换。
On most systems, good performance will not be achieved when more than a few hundred processes are created because of the high context-switching overhead.
在大多数的系统中,当创建了上千个进程时,系统性能将大幅降低,因为超负荷的上下文切换。
On most systems, good performance will not be achieved when more than a few hundred processes are created because of the high context-switching overhead.
应用推荐