加拿大COEN346作业代写,北美CS 操作系统作业课程代写

往期写作 717 2 年前

来自加拿大代写的顾客授权发布的operating systems,COEN346作业要求片段,我们不会发布COEN346的answer在网站,我们曾经写过COEN346及相关的operating systems写过很多作业,考试,如果你也需要代写这个课程的作业请联系客服WX:QQ 5757940 ,代写人的代写服务覆盖全球华人留学生,可以为CA的学生提供非常准时精湛的服务,小作业assignment代写、essay代写享适时优惠,project、paper代写、论文代写支持分期付款,网课、exam代考预约时刻爆单中赶紧来撩。

实现一个进程调度器的模拟,它负责调度一个给定的进程列表。 调度程序在一台只有一个 CPU 的机器上运行。 调度策略是一种非抢占式循环调度,其工作方式如下:- 调度程序以循环方式工作,即它将 CPU 分配给进程一段时间,然后再取回 CPU。 ...

 

Questions:

Implement  the  simulation  of  a  process  scheduler  that  is  responsible  for  scheduling  a  given  list  of  processes. The scheduler is running on a machine with one CPU. The scheduling policy is a type of non-preemptive round-robin scheduling and works as follows:
- Scheduler works in a cyclic manner, i.e. it gives the CPU to a process for a quantum of time and then get the CPU back.
-  The  quantum  for  each  process  is  equal  to  10  percent  of  the  remaining  execution  time  of  the  process.
- Each process comes with its own arrival time and burst time.
-  Each  time,  the  scheduler  gives  the  CPU  to  a  process  (say  P1)  that  has  the  shortest  remaining  processing  time,  but  this  should  not  starve  other  processes in  the  queue,  and  which  are  ready to  start. These processes should be allocated to the CPU before it is given back to P1, i.e. include some fairness for long jobs already in the queue.
- In the case that two or more processes have equal remaining time for completion, the scheduler gives priority to the older process (i.e. process that has been in the system for longer time).

The simulation should determine and print out the time each process has spent in the waiting queue. The input consists of a file named “input.txt” and the output should be written to “output.txt”.  Input: Each line of the input file contains information related to one process. The first column is  the  arrival  time  (ready  time)  of  the  process  and  the  second  column  shows  the  required
execution time for the process.

Output: Set of strings indicating events in the program including Start and End of each process: E.g. Time: 2, Process 1: Started/Finished. “Time: 2” indicates the occurrence  time  of  the  event  in  seconds.  Moreover  “Started”  or  “Finished”  indicates  the  type  of  event.
- Start and End of each time slice: This event happens when the scheduler pauses or resumes the execution of a process (i.e. load or remove the process from CPU). E.g. Time: 5, Process 2:

Paused/Finished.  “Time:  5”  indicates  the  occurrence  time  of  the  event  in  seconds,  “Process  1”  indicates the process related to this event. “Paused” or “Finished” indicates the type of event. Waiting  time  for  each  process:  For  example,  Process  2  waits  2  seconds  in  the  waiting  mode,  in total, that is (Time2 – Time1) + (Time4 – Time3) = (2-1) +(4-3) = 1+1= 2.

Implementation Requirements:
• The  processes  (both  scheduler  and  processes)  must  be  simulated  using  threads.  The  scheduler should be able to resume each process and only one process should be running at a  time  (because  the  simulated  system  has  only  one  CPU).  This  means  that  the  simulated process  (P1)  should  suspend  its  execution  and  give  the  CPU  back  to  the  scheduler  thread,
then  the  scheduler  resumes  the  next  simulated  process  (e.g.  P2)  based  on  the  discussed scheduling policy. Each process is responsible to keep track of its total execution and inform the scheduler thread when it is finished. This process continues until all processes are done.
• The program must work with arbitrary number of threads.
• Note that the implementation should be done in Java or C++.

• The assignment can be done in a group of two students.
• The deliverable must be a .zip file which consists of:
 A well-commented code,
 The executable file of the assignment (e.g. example.exe).
 A report document. Do not include your code in your report

• The report should be at least two pages with the following sections:
 Name of group members
 High  level  description  of  the  code  (description  of  the  methods/functions/threads/data structures and the flow of the program).
 A  detailed  conclusion,  discussing  you  experience  with  using  thread  for  simulating  shortest job  remaining  time  scheduling  (e.g.  is  the  simulation  accurate?).  You  also  need  to  analyze  your  program and discuss its drawbacks and advantages compared to pure round robin technique among all the processes independently of the processing time.

If you are a student from an English-speaking country, please feel free to contact us at [email protected] and we will provide you with an excellent writing service.

 

为什么选择代写人 代写

作为现存十年的代写服务机构,我们没有任何学术丑闻,我们保护顾客隐私、多元化辅导、写作、越来越多的小伙伴选择代写人为他们解决棘手的各类作业难题,保障GPA,为留学梦助力! 我们的客服团队及写手老师总是能第一时间响应顾客的各类作业需求,有些人即使有重要的事甚至带伤上场协助考试。Final季,忙的时候一天十几场考试还在继续坚持着,我知道,他们明明可以不用这么辛苦的…但是他们为了坚守承诺,为了另一端屏幕外的那一份期望,他们没有选择退缩、时刻为同学们提供最好的!这么有温度的代写还不添加备用一下?WX/QQ: 5757940

我们的光辉战绩

我们存在的意义就是为您解决每一个学术烦恼,您的满意是我们永远的追求

19

客服团队

500

写作团队

74912

服务客户

265476

完成数量