热门标签 | 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


推荐阅读
  • 如何在Java中使用DButils类
    这期内容当中小编将会给大家带来有关如何在Java中使用DButils类,文章内容丰富且以专业的角度为大家分析和叙述,阅读完这篇文章希望大家可以有所收获。D ... [详细]
  • 尽管我们尽最大努力,任何软件开发过程中都难免会出现缺陷。为了更有效地提升对支持部门的协助与支撑,本文探讨了多种策略和最佳实践,旨在通过改进沟通、增强培训和支持流程来减少这些缺陷的影响,并提高整体服务质量和客户满意度。 ... [详细]
  • 浅析python实现布隆过滤器及Redis中的缓存穿透原理_python
    本文带你了解了位图的实现,布隆过滤器的原理及Python中的使用,以及布隆过滤器如何应对Redis中的缓存穿透,相信你对布隆过滤 ... [详细]
  • 本文详细介绍了 PHP 中对象的生命周期、内存管理和魔术方法的使用,包括对象的自动销毁、析构函数的作用以及各种魔术方法的具体应用场景。 ... [详细]
  • 开机自启动的几种方式
    0x01快速自启动目录快速启动目录自启动方式源于Windows中的一个目录,这个目录一般叫启动或者Startup。位于该目录下的PE文件会在开机后进行自启动 ... [详细]
  • 在本地环境中部署了两个不同版本的 Flink 集群,分别为 1.9.1 和 1.9.2。近期在尝试启动 1.9.1 版本的 Flink 任务时,遇到了 TaskExecutor 启动失败的问题。尽管 TaskManager 日志显示正常,但任务仍无法成功启动。经过详细分析,发现该问题是由 Kafka 版本不兼容引起的。通过调整 Kafka 客户端配置并升级相关依赖,最终成功解决了这一故障。 ... [详细]
  • Java中不同类型的常量池(字符串常量池、Class常量池和运行时常量池)的对比与关联分析
    在研究Java虚拟机的过程中,笔者发现存在多种类型的常量池,包括字符串常量池、Class常量池和运行时常量池。通过查阅CSDN、博客园等相关资料,对这些常量池的特性、用途及其相互关系进行了详细探讨。本文将深入分析这三种常量池的差异与联系,帮助读者更好地理解Java虚拟机的内部机制。 ... [详细]
  • Netty框架中运用Protobuf实现高效通信协议
    在Netty框架中,通过引入Protobuf来实现高效的通信协议。为了使用Protobuf,需要先准备好环境,包括下载并安装Protobuf的代码生成器`protoc`以及相应的源码包。具体资源可从官方下载页面获取,确保版本兼容性以充分发挥其性能优势。此外,配置好开发环境后,可以通过定义`.proto`文件来自动生成Java类,从而简化数据序列化和反序列化的操作,提高通信效率。 ... [详细]
  • 本文探讨了利用Java实现WebSocket实时消息推送技术的方法。与传统的轮询、长连接或短连接等方案相比,WebSocket提供了一种更为高效和低延迟的双向通信机制。通过建立持久连接,服务器能够主动向客户端推送数据,从而实现真正的实时消息传递。此外,本文还介绍了WebSocket在实际应用中的优势和应用场景,并提供了详细的实现步骤和技术细节。 ... [详细]
  • 在处理大图片时,PHP 常常会遇到内存溢出的问题。为了避免这种情况,建议避免使用 `setImageBitmap`、`setImageResource` 或 `BitmapFactory.decodeResource` 等方法直接加载大图。这些函数在处理大图片时会消耗大量内存,导致应用崩溃。推荐采用分块处理、图像压缩和缓存机制等策略,以优化内存使用并提高处理效率。此外,可以考虑使用第三方库如 ImageMagick 或 GD 库来处理大图片,这些库提供了更高效的内存管理和图像处理功能。 ... [详细]
  • 如何使用和示例代码解析 org.semanticweb.owlapi.model.OWLSubPropertyChainOfAxiom.getPropertyChain() 方法 ... [详细]
  • 为了向用户提供虚拟应用程序,通常会在基础架构中部署StoreFront或Web Interface。为了确保安全的远程访问,通常需要在DMZ中配置Secure Gateway或Access Gateway。本文详细对比了这两种界面工具的功能特性,包括用户管理、安全性、性能优化等方面,为企业选择合适的解决方案提供了全面的参考。 ... [详细]
  • 分布式开源任务调度框架 TBSchedule 深度解析与应用实践
    本文深入解析了分布式开源任务调度框架 TBSchedule 的核心原理与应用场景,并通过实际案例详细介绍了其部署与使用方法。首先,从源码下载开始,详细阐述了 TBSchedule 的安装步骤和配置要点。接着,探讨了该框架在大规模分布式环境中的性能优化策略,以及如何通过灵活的任务调度机制提升系统效率。最后,结合具体实例,展示了 TBSchedule 在实际项目中的应用效果,为开发者提供了宝贵的实践经验。 ... [详细]
  • 本文详细介绍了Java反射机制的基本概念、获取Class对象的方法、反射的主要功能及其在实际开发中的应用。通过具体示例,帮助读者更好地理解和使用Java反射。 ... [详细]
  • 本文详细探讨了Zebra路由软件中的线程机制及其实际应用。通过对Zebra线程模型的深入分析,揭示了其在高效处理网络路由任务中的关键作用。文章还介绍了线程同步与通信机制,以及如何通过优化线程管理提升系统性能。此外,结合具体应用场景,展示了Zebra线程机制在复杂网络环境下的优势和灵活性。 ... [详细]
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社区 版权所有