热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

关于后端:COMP-2006J-Scheduling

OperatingSystemsAssignment01:SchedulingCOMP2006JAutumn,20211SchedulingSimulatorPleasedownloadtheschedulingsimulatorskeletoncodefromt

Operating Systems
Assignment 01: Scheduling
COMP 2006J
Autumn, 2021
1 Scheduling Simulator
Please download the scheduling simulator skeleton code from the moodle. The scheduling simulator illustrates
the behaviour of scheduling algorithms against a simulated mix of process loads. The user can specify the number
of processes, the mean and standard deviation for compute time and I/O blocking time for each process, and
the duration of the simulation. At the end of the simulation, a statistical summary is presented.
We have given the implementation of FIFO scheduling as an example of how to implement a scheduling algorithm
in the given environment. You are allowed to use any development environment you prefer. Please go through
the instructions carefully and complete the assignment.
2 Running the Simulator
• Compile the java code using the following command.
1 $ javac *. java
• The program reads a configuration file (scheduling.conf) and writes two output files (Summary-Results
and Summary-Processes).
• To run the program, enter the following in the command line.
1 $ java Scheduling scheduling . conf
• The program will display “Working…” while the simulation is working, and “Completed.” when the
simulation is complete.
• The simulator reads parameters from the configuration file (“scheduling.conf”).
2.1 The configuration file
• The configuration file (scheduling.conf) is used to specify various parameters for the simulation.
• There are a number of options which can be specified in the configuration file. These are summarized in
the table below.
Keyword Values Description
numprocess n The number of processes to create for the simulation.
meandev n The average length of time in milliseconds that a process should execute before terminating.
standdev n
The number of standard deviations from the average length of time a process should
execute before terminating.
process n
The amount of time in milliseconds that the process should execute before blocking for input
or output. There should be a separate process directive for each process specified by the
numprocess directive.
runtime n The maximum amount of time the simulation should run in milliseconds.
timeslice n The amount of time for a timeslice in the round-robin implementation.
test 1 or 0 If testing == 1, system use meandev as each process’s length. This is for testing purposes.
3 FIFO Scheduling
• Open the ‘SchedulingAlgorithm.java’ file. You can find the implementation of the FIFO scheduling algorithm
here.
• Please go through the FIFO method carefully and try to understand how this version of FIFO algorithm
works. Specifically, give attention to the timer-counter usage in the implementation.
University College Dublin 1
Operating Systems
Assignment 01: Scheduling
COMP 2006J
Autumn, 2021
• Try to identify the design decisions taken when implementing this algorithm. I.e: assumptions, scope and
limitations.
• Change values in the configuration file and try different types of workloads. Set ‘test’ to ‘0’ when you are
experimenting.
4 Round-robin Scheduling
• Implement the round-robin scheduling algorithm in the ‘SchedulingAlgorithm.java’ file. Use the given
‘.test’ output files as references.
• Assume that the time each process stays in the blocked state is 0.
• Use the print functions in the ‘SchedulingAlgorithm.java’ file to update the ‘Summary-Processes’ file.
5 Testing
• After implementation, execute the ‘run test.py’ to check the accuracy of your algorithm. Please note that
this script is given for your convenience. It is not mandatory to use this. It is written in python and
requires a working installation of python3 to run.
• It compares your output file with a preprocessed output file, which is generated with a round-robin
scheduling algorithm.
• You can add more of your own tests if you prefer. Please add those new tests to ‘tests.txt’ file.
6 Submission
• Submit the ‘SchedulingAlgorithm.java’ file to the submission link in the moodle before the deadline.
• You will be marked against a set of test cases.
• Please keep the code clean and add comments. There will be marks for the code quality and comments.
7 Assessment
Your submission will be tested against input that we have designed. To help you get started, a file called
run test.py has been supplied. Keep the following points in mind:
• run test.py is only a sample. The actual test will contain more tests.
• Do NOT change the input/output format of the code given to you. Any change will result in your code
failing the tests.
• Do NOT output anything other than what has been asked for. If you have added any outputs for your
own convenience, you should remove/comment them before submission.
University College Dublin 2


推荐阅读
  • VScode格式化文档换行或不换行的设置方法
    本文介绍了在VScode中设置格式化文档换行或不换行的方法,包括使用插件和修改settings.json文件的内容。详细步骤为:找到settings.json文件,将其中的代码替换为指定的代码。 ... [详细]
  • 本文介绍了设计师伊振华受邀参与沈阳市智慧城市运行管理中心项目的整体设计,并以数字赋能和创新驱动高质量发展的理念,建设了集成、智慧、高效的一体化城市综合管理平台,促进了城市的数字化转型。该中心被称为当代城市的智能心脏,为沈阳市的智慧城市建设做出了重要贡献。 ... [详细]
  • Linux重启网络命令实例及关机和重启示例教程
    本文介绍了Linux系统中重启网络命令的实例,以及使用不同方式关机和重启系统的示例教程。包括使用图形界面和控制台访问系统的方法,以及使用shutdown命令进行系统关机和重启的句法和用法。 ... [详细]
  • 本文讨论了如何优化解决hdu 1003 java题目的动态规划方法,通过分析加法规则和最大和的性质,提出了一种优化的思路。具体方法是,当从1加到n为负时,即sum(1,n)sum(n,s),可以继续加法计算。同时,还考虑了两种特殊情况:都是负数的情况和有0的情况。最后,通过使用Scanner类来获取输入数据。 ... [详细]
  • 本文介绍了九度OnlineJudge中的1002题目“Grading”的解决方法。该题目要求设计一个公平的评分过程,将每个考题分配给3个独立的专家,如果他们的评分不一致,则需要请一位裁判做出最终决定。文章详细描述了评分规则,并给出了解决该问题的程序。 ... [详细]
  • 本文介绍了Oracle数据库中tnsnames.ora文件的作用和配置方法。tnsnames.ora文件在数据库启动过程中会被读取,用于解析LOCAL_LISTENER,并且与侦听无关。文章还提供了配置LOCAL_LISTENER和1522端口的示例,并展示了listener.ora文件的内容。 ... [详细]
  • 解决VS写C#项目导入MySQL数据源报错“You have a usable connection already”问题的正确方法
    本文介绍了在VS写C#项目导入MySQL数据源时出现报错“You have a usable connection already”的问题,并给出了正确的解决方法。详细描述了问题的出现情况和报错信息,并提供了解决该问题的步骤和注意事项。 ... [详细]
  • 本文介绍了一个在线急等问题解决方法,即如何统计数据库中某个字段下的所有数据,并将结果显示在文本框里。作者提到了自己是一个菜鸟,希望能够得到帮助。作者使用的是ACCESS数据库,并且给出了一个例子,希望得到的结果是560。作者还提到自己已经尝试了使用"select sum(字段2) from 表名"的语句,得到的结果是650,但不知道如何得到560。希望能够得到解决方案。 ... [详细]
  • HDFS2.x新特性
    一、集群间数据拷贝scp实现两个远程主机之间的文件复制scp-rhello.txtroothadoop103:useratguiguhello.txt推pushscp-rr ... [详细]
  • 本文介绍了三种方法来实现在Win7系统中显示桌面的快捷方式,包括使用任务栏快速启动栏、运行命令和自己创建快捷方式的方法。具体操作步骤详细说明,并提供了保存图标的路径,方便以后使用。 ... [详细]
  • 本文介绍了南邮ctf-web的writeup,包括签到题和md5 collision。在CTF比赛和渗透测试中,可以通过查看源代码、代码注释、页面隐藏元素、超链接和HTTP响应头部来寻找flag或提示信息。利用PHP弱类型,可以发现md5('QNKCDZO')='0e830400451993494058024219903391'和md5('240610708')='0e462097431906509019562988736854'。 ... [详细]
  • 3.223.28周学习总结中的贪心作业收获及困惑
    本文是对3.223.28周学习总结中的贪心作业进行总结,作者在解题过程中参考了他人的代码,但前提是要先理解题目并有解题思路。作者分享了自己在贪心作业中的收获,同时提到了一道让他困惑的题目,即input details部分引发的疑惑。 ... [详细]
  • 本文介绍了如何清除Eclipse中SVN用户的设置。首先需要查看使用的SVN接口,然后根据接口类型找到相应的目录并删除相关文件。最后使用SVN更新或提交来应用更改。 ... [详细]
  • 本文介绍了一道网络流题目hdu4888 Redraw Beautiful Drawings的解题思路。题目要求以行和列作为结点建图,并通过最大流算法判断是否有解以及是否唯一。文章详细介绍了建图和算法的过程,并强调在dfs过程中要进行回溯。 ... [详细]
  • 【shell】网络处理:判断IP是否在网段、两个ip是否同网段、IP地址范围、网段包含关系
    本文介绍了使用shell脚本判断IP是否在同一网段、判断IP地址是否在某个范围内、计算IP地址范围、判断网段之间的包含关系的方法和原理。通过对IP和掩码进行与计算,可以判断两个IP是否在同一网段。同时,还提供了一段用于验证IP地址的正则表达式和判断特殊IP地址的方法。 ... [详细]
author-avatar
我就是老笨2013
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有