如何使用循环调度程序执行此分配 [英] How Do I Do This Assignment using round robin scheduler

查看:73
本文介绍了如何使用循环调度程序执行此分配的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您将获得以下结果:

•设置/创建任务流程需要20个时间量。

•需要20个时间量子才能撕掉 - 下来/结束一个任务过程。

•需要500个时间量子从磁盘读入一个文本文件。

•上下文切换需要15个时间量子。

•调度程序在每个周期开始时需要30个时间量子供自己使用。此外,调度程序还会引发入口上下文切换,与任何其他进程相同。

•高优先级用户任务流程为ALU时间提供90个时间量。

•标准用户任务优先级过程给出60个ALU时间的时间量。 />
•当用户任务进程完成时,它会发出请求拆除/结束进程的内核调用,然后它会产生剩余时间量并立即跟随上下文切换进行拆卸过程。 />
•假设记者和时间量子计数器及其相关的输出报告是免费的,它们不消耗时间量。

用户任务过程数据文件的内容(格式为你)愿望):

•用户任务A需要1250时间量且具有标准优先级

•用户任务B需要970时间量且具有高优先级

•用户任务C需要75个时间量且具有标准优先级

•用户任务D需要2000个时间量且具有高优先级16





您要执行以下操作:

•创建数据文件

•为模型调度程序创建代码

•执行:让RR调度程序读取数据并处理它

o启动:启动量子计数器/定时器,读取文件,执行第一个上下文切换命令,加载/启动RR调度程序,第二个上下文切换命中,第一个循环开始。 br />
o完成所有周期后,程序记者输出每个任务过程的开始时间,等待时间和结束时间。

o当所有周期都完成后,你的程序记者输出:系统的总效率是多少(显示计算的详细信息)?:有用工作过程的比例量子/经过的总时间量。

•写一个摘要(最多2页)摘要包括:每个文件的名称及其用途,结果,方法的简要总结(使用的语言,主要假设等),关于哪个部分的简要说明o f调度程序是你最难编写的,为什么

You are given the following:
• It takes 20 time quanta to set-up/create a task process.
• It takes 20 time quanta to tear-down/end a task process.
• It takes 500 time quanta to read in from disk a text file.
• It takes 15 time quanta to context switch.
• It the scheduler takes 30 time quanta at the beginning of each cycle for its own use. In addition, the scheduler also incurs a entry context switch, the same as any other process.
• A high priority user task process is given 90 time quanta of ALU time.
• A standard user task priority process is given 60 time quanta of ALU time.
• When a user task process finishes, it issues a kernel call requesting a tear-down/end process, then it yields its' remaining time quanta and is immediately followed the context switch for the teardown process.
• Assume reporters and time quanta counters and their related output report(s) are free, they consume no time quanta.
Contents for the user task process data file (format as you wish):
• User Task A requires 1250 time quanta and has a standard priority
• User Task B requires 970 time quanta and has a high priority
• User Task C requires 75 time quanta and has a standard priority
• User Task D requires 2000 time quanta and has a high priority16


You are to do the following:
• Create a data file
• Create code for your model scheduler
• Execute: Have your RR scheduler read the data in and process it
o Start up: The quanta counter/timer is started, the file is read, the first context switch hit is taken, the RR scheduler is loaded/started, the second context switch hit is taken and the first cycle begins.
o When all cycles have been completed have your program reporter output the starting time, waiting and finishing time of each task process.
o When all cycles have been completed have your program reporter output: What was the total efficiency of the system (show the details of the calculation)?: Ratio of useful work process quanta / The total elapsed time quanta.
• Write a summary (2 page max) summary including: The name of each file and its' purpose, the results, brief summary of your approach (which language used, major assumptions, etc.), brief statement about which part of the scheduler was the hardest for you to write and why

推荐答案

你的任务?答案是:你将自己独立完成。如果你以任何其他方式这样做,你将错过一个难得的机会来解决这个重要的问题,从而学习这个主题。事情就是这样:看似从讲座和研讨会中获得的知识,以及从阅读中获得的知识往往是虚幻的。如果你试图完全自己解决问题,你只能摧毁这种幻想。 这是唯一的方式,以确保您获得真正的知识。



我必须添加这个人类自然是一个关于自己知识的妄想的主题,这是我在很多人中清楚地观察到的,包括我自己。但还有更多的基本因素:1)当你讲课,写书或文章时,你在身体上找不到时间和文字来解释所有微妙的细节,2)不可能教导主要的东西:思考,不给出一些实际问题。 br />


如果我们帮助您,它将破坏您获取这些知识的机会。要修复它,你需要忘记所有的帮助,并最终再次自己解决同样的问题,但这可能需要更多的时间。现在不要节省时间,不要在将来浪费时间。



我想建议你过去关于学习主题的帖子,我觉得很有趣但是有用:我想成为一个好的网络开发人员使用语言c#



感谢您的理解。



祝你取得最大的成功。

-SA
Your assignment? The answer is: you will do it independently, on your own. If you do it in any other way, you would miss a rare opportunity to solve this important problem and hence learn the topic. Here is the thing: knowledge seemingly acquired from lectures and seminars, and from just reading, tends to be illusionary. You can only destroy such illusions if you try to solve problems completely on your own. And this is the only way to make sure you get real knowledge.

I must add that this human nature to be a subject of delusions about one's own knowledge is something I clearly observed in many, including myself. But there are more fundamental factors: 1) when you lecture, write books or articles, you physically cannot find time and words to explain all subtle detail, 2) it is impossible to teach main thing: thinking, without giving some practical problems.

If we help you, it will break your opportunity to get this knowledge. To fix it, you would need to forget all that help and eventually get to the same problem again, on your own, but that might take much more time. Don't save time now, don't waste time in future.

I want to suggest you my past post on the topic of learning, I think pretty funny but useful: I want to be a good dot net developer using language c#.

Thank you for understanding.

Wish you the most of success.
—SA


这篇关于如何使用循环调度程序执行此分配的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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