在Linux SCHED_FIFO和SCHED_RR [英] On Linux SCHED_FIFO and SCHED_RR

查看:1008
本文介绍了在Linux SCHED_FIFO和SCHED_RR的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在写一个非常小的守护进程,甚至当系统严重胁迫下必须保持响应。我期待在问候调度SCHED_FIFO和SCHED_RR之间的差异,以及试图确定一个明智的优先级。

I'm writing a a very small daemon that must remain responsive even when a system is under severe stress. I'm looking at the differences between SCHED_FIFO and SCHED_RR in regards to scheduling, as well as trying to determine a sensible priority.

这将调度一个小而关键的监控守护进程是适当的,有什么优先事项将是合理的安全?我还是来了试图理解这两者之间的区别时有点模糊。

Which scheduler would be appropriate for a small but critical monitoring daemon, what priority would be reasonably safe? I'm still coming up a little fuzzy when trying to understand the differences between the two.

我的计划是在3K分配(并使用mlockall用于()),将其写入大约600个​​字节xenbus然后睡觉,但我不可能告诉它多少时间(毫秒)采取实际写入数据。 。由于所写取决于一个配置文件。

My program is allocating under 3k (and uses mlockall()), it writes about 600 bytes to xenbus then sleeps, but its impossible for me to tell how much time (in ms) it will take to actually write the data.. since what is written depends on a configuration file.

在此先感谢您的任何建议/解释。

Thanks in advance for any suggestions / explanations.

推荐答案

臭名昭著的 pchdtvr 程序,它可以捕获数字电视信号,使用 SCHED_FIFO ,以确保电视数据包写入磁盘不管。它可以一次拍摄4所示,而一台旧电脑玩厄运。

The infamous pchdtvr program, which captures digital TV signals, uses SCHED_FIFO to make sure that the TV packets are written to disk no matter what. It can capture 4 shows at once while playing Doom on an old computer.

该计划是臭名昭著的,因为它是GPL下发布和作者试图追溯撤销GPL 。这一行为引起了轻微的轩然大波。无论如何,你可以找到一个新版本在 http://frequal.com/pmn/pchdtvr.html 来学习。

The program is infamous because it was released under GPL and the author tried to revoke the GPL retroactively. This act provoked a minor firestorm. Anyway, you can find a recent version to study at http://frequal.com/pmn/pchdtvr.html.

这篇关于在Linux SCHED_FIFO和SCHED_RR的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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