优先级老化作为进程调度策略。有什么优点和缺点?

发布于 2024-09-07 14:02:00 字数 92 浏览 0 评论 0原文

我一直在对优先级调度算法进行一些研究,尽管我发现优先级老化是一个非常基本(并且看似合理)的策略,但我几乎找不到有关它的信息。有人可以让我知道实现算法的问题和优点吗?谢谢!

I have been doing some research on priority scheduling algorithms, and although I find Priority Aging to be a very basic (and seemingly sound) strategy, I can barely find information about it. Could someone please let me know the issues and advantages of implementing an algorithm? Thanks!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

我三岁 2024-09-14 14:02:00

看来优先级老化会根据任务运行的时间和/或任务消耗的资源量来更改任务的优先级(通常较低)。

IBM 对 适用于 Linux、Unix 和 Windows 的 DB2 版本 9.7 中的优先级老化

优先级老化的最大优点来自IBM的解释:

可以用来帮助短查询更快地运行的一个简单方法是定义一系列服务类,这些服务类具有依次降低的资源优先级和在服务子类之间移动活动的阈值操作。使用此设置,您可以随着时间的推移降低或老化运行时间较长的工作的优先级,并可能改善运行时间较短的工作的响应时间,而无需详细了解数据服务器上运行的活动。

最大的缺点是优先级老化比先进先出队列更难实现,并且可能不会提供任何响应时间改进。

It appears that priority aging changes the priority of a task (usually lower) depending on how long the task has been running and / or how many resources the task consumes.

IBM has an explanation of the priority aging in DB2 version 9.7 for Linux, Unix, and Windows.

The biggest advantage of priority aging comes from the IBM explanation:

A simple approach that you can use to help short queries to run faster is to define a series of service classes with successively lower levels of resource priority and threshold actions that move activities between the service subclasses. Using this setup, you can decrease, or age, the priority of longer-running work over time and perhaps improve response times for shorter-running work without having detailed knowledge of the activities running on your data server.

The biggest disadvantage is that priority aging is harder to implement than a first-in, first-out queue, and may not provide any response time improvement.

眼眸里的那抹悲凉 2024-09-14 14:02:00

优先级调度的优点:

  1. 简单。
  2. 合理支持优先。
  3. 适用于具有不同时间和资源需求的应用程序。

优先级调度的缺点:

  1. 无限期阻塞或饥饿。
  2. 优先级调度可以让一些低优先级进程无限期地等待CPU。
  3. 如果系统最终崩溃,那么所有未完成的低优先级进程都会丢失。

Advantages of Priority Scheduling:

  1. Simplicity.
  2. Reasonable support for priority.
  3. Suitable for applications with varying time and resource requirements.

Disadvantages of Priority Scheduling:

  1. Indefinite blocking or starvation.
  2. A priority scheduling can leave some low priority waiting processes indefinitely for CPU.
  3. If the system eventually crashes then all unfinished low priority processes gets lost.
烟酒忠诚 2024-09-14 14:02:00

根据老化过程的工作方式,最坏情况的行为可能与简单队列一样糟糕。

Depending on how the aging process works, the worst case behavior can be just as bad as a simple queue.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文