如果上下文切换的值非常高,则增加时间切片可提高性能,但这必须在经过大量分析之后才能实施。
If the value of context switching is very high, increasing the time slice can improve performance, but this should only be done after extensive analysis.
首先,就计算时间而言,事务上下文切换是开销相当大的操作。
First, transaction context switches are quite expensive operations in terms of computation time.
增加时间切片可减少上下文切换,从而可以提高系统吞吐量。
Increasing the time slice can improve system throughput due to reduced context switching.
然而,在现代的Linux中,不同进程之间的上下文切换所花的时间只比同一进程的线程之间相应的上下文切换多15%。
With modern Linux, though, a context switch between distinct processes might take only 15% more time than the corresponding context switch between same-process threads.
该方法考虑了上下文切换消耗时间对调度算法的影响,可以减少低优先级任务不必要的频繁抢占。
The algorithm considers the time consumption of context switches, and can reduce the unnecessary preempting behavior to tasks which have lower priorities.
上下文切换的时间开销较重;在切换时,系统没有做有用的工作。
Context-switch time is overhead; the system does no useful work while switching.
我知道如果我排队200个线程,它需要更长的时间来完成所有的事情,不是让10运行在一个时间(各种争取资源,在CPU,等,等上下文切换)。
I know for a fact that if I queue up 200 threads, it takes longer to complete everything than letting 10 run at a time (various fighting for resources, context switching in the CPU, etc, etc).
而这些线程都是可运行的,Windows内核花费大量的时间在进行线程的上下文切换,并没有多少时间花在线程运行上。
These threads are runnable, Windows takes a lot of time during kernel thread context switches, and not much time is spent on running the thread.
而这些线程都是可运行的,Windows内核花费大量的时间在进行线程的上下文切换,并没有多少时间花在线程运行上。
These threads are runnable, Windows takes a lot of time during kernel thread context switches, and not much time is spent on running the thread.
应用推荐