什么是优先级反转? [英] What is priority inversion?

查看:23
本文介绍了什么是优先级反转?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我听说过关于操作系统开发的优先级反转"这个词.

I've heard the phrase 'priority inversion' in reference to development of operating systems.

究竟什么是优先级倒置?

What exactly is priority inversion?

它要解决的问题是什么,它是如何解决的?

What is the problem it's meant to solve, and how does it solve it?

推荐答案

优先级反转是一个问题,而不是解决方案.典型的例子是低优先级进程获取高优先级进程需要的资源,然后被中优先级进程抢占,所以高优先级进程在资源上阻塞,而中优先级进程完成(实际上是用较低的优先级).

Priority inversion is a problem, not a solution. The typical example is a low priority process acquiring a resource that a high priority process needs, and then being preempted by a medium priority process, so the high priority process is blocked on the resource while the medium priority one finishes (effectively being executed with a lower priority).

一个相当著名的例子是火星探路者火星车遇到的问题:http://www.cs.duke.edu/~carla/mars.html,读起来很有趣.

A rather famous example was the problem experienced by the Mars Pathfinder rover: http://www.cs.duke.edu/~carla/mars.html, it's a pretty interesting read.

这篇关于什么是优先级反转?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆