在这种情况下,低优先级线程和另一个线程都会被提高优先级。
In this case, the low-priority thread and that other thread are boosted.
在RT系统中必须小心地管理同步,以防止高优先级线程等待低优先级线程的情况发生。
Synchronization must be carefully managed within a RT system to prevent high-priority threads from waiting for lower-priority threads.
优先级反转将延迟低优先级线程和高优先级线程的执行。
The inversion of priorities delays both the low- and the high-priority thread from making progress.
一个优先级系统可以只对“高优先级”线程投入比低优先级线程更多的注意力。
One priority system could simply devote more attention to "high-priority" threads than to low-priority ones.
优先级继承确保了在高优先级线程需要的资源被低优先级线程占用时,避免发生优先级反转。
Priority inheritance ensures that priority inversion is avoided when a higher-priority thread needs a resource held by a lower-priority thread.
无优先级反转:高优先级的线程不会因中优先级线程正在运行,而被持有其所需锁的低优先级线程阻塞。
No priority inversions: High-priority threads cannot be blocked by low-priority threads holding locks they need because medium-priority threads are running.
通过线程,可以优先调度重要任务—甚至中断—低优先级任务。
With threads, important tasks can be scheduled to take precedence over-and even interrupt-lower-priority tasks.
还有一种可能是在启动时派生一个单独的低优先级的线程,当系统空闲时再去完成初始化,不过这种方法需要特别注意处理好同步。
Another possibility is to fork a separate low-priority thread during startup to perform initialization when the system is idle, although this choice requires more care to handle synchronization.
在刚刚描述的场景中,发生锁争用时低优先级的线程以高优先级运行,直至线程释放锁。
In the scenario just described, the low-priority thread runs at high priority when lock contention occurs until the point in time that it releases the lock.
就像规范要求的那样,一个低优先级线程(优先级p3)获取了一个对象的锁,会被一个高优先级(优先级p1)的线程夺取执行权。
A low priority thread (at priority P3) acquires the lock on an object and is pre-empted by a higher priority thread (at priority P1), as the specification mandates.
优先级反转指的是阻塞高优先级线程的锁由低优先级线程持有。
Priority inversion is a condition where a high-priority thread is blocked on a lock held by a low-priority thread.
一个必须在精确时间内响应事件的应用程序无法确保不会在一个高优先级线程之前调度另一个低优先级线程。
An application that must respond to events in a well-defined time has no way to ensure that another low-priority thread won't get scheduled in front of a high-priority thread.
可能存在下面一种情况:高优先级线程试图获取低优先级线程持有的锁,而低优先级线程自身又被另一个线程持有的另一个锁阻塞。
It's possible that, at the point the high-priority thread tries to acquire the low-priority thread's lock, the low-priority thread itself is blocked on a different lock held by a another thread.
锁定一个资源会影响所有低优先级的线程,就算这些线程根本对这个资源没有兴趣。
Locking a resource affects all the threads with lower priority even if not interested to the resource.
如果一个高优先级的线程请求低优先级线程持有的锁会造成它在低优先级线程之后等待。
A higher priority thread can wait behind a lower priority thread if the lower priority thread holds a lock for which the higher priority thread is waiting.
该模型扩展了固定优先级调度模型,同时通过实现模型中线程数的减少实现了运行时的低开销。
It expands a fixed priority scheduling model and minimizes run-time costs by minimizing the number of threads in the implementation.
我有什么办法可以设置一个低优先级或不同的调度(或两者),主线程有更多的CPU时间来运行?
Is there any way I can set a lower priority or a different scheduling (or combination of both) so the main thread has more CPU time to run?
“高优先级线程”会优先于“低优先级线程”执行。
Threads with higher priority are executed in preference to threads with lower priority.
每个线程都有一个优先级,高优先级线程的执行优先于低优先级线程。
Every thread has a priority. Threads with higher priority are executed in preference to threads with lower priority.
每个线程都有一个优先级,高优先级线程的执行优先于低优先级线程。
Every thread has a priority. Threads with higher priority are executed in preference to threads with lower priority.
应用推荐