- 作业标题:CSCI 3120 - Assignment 4: CPU Scheduling
- 课程名称:Dalhouse University CSCI 3120 Operating Systems
- 完成周期:2天
1. Assignment Overview
In this assignment, you need to design and implement a C program that simulates a CPU scheduler. This scheduler is capable of using varied scheduling algorithms to schedule a group of computation tasks.
2. Important Note
There is a zero-tolerance policy on academic offenses such as plagiarism or inappropriate collaboration. By submitting your solution for this assignment, you acknowledge that the code submitted is your own work. You also agree that your code may be submitted to a plagiarism detection software (such as MOSS) that may have servers located outside Canada unless you have notified me otherwise, in writing, before the submission deadline. Any suspected act of plagiarism will be reported to the Faculty’s Academic Integrity Officer in accordance with Dalhousie University’s regulations regarding Academic Integrity. Please
note that:
The assignments are individual assignments. You can discuss the problems with your friends/classmates, but you need to write your program by yourself. There should not be much similarity in terms of coding.
When you refer to some online resources to complete your program, you need to understand the mechanism, then write your own code. Your code should not be similar to the online resources. In addition, you should cite the sources via comments in your program.
3. Detailed Requirements
- Overview: In this assignment, you need to design and implement a C program that simulates a CPU scheduler. This scheduler is capable of using the following scheduling algorithms to schedule a group of computation tasks:
First-Come First-Served (FCFS): FCFS schedules tasks in the order in which they arrive at
the ready queue.Round-Robin (RR): Computation tasks are served in a round-robin fashion. When there are
multiple tasks to be served, each task is executed for a time quantum, then the next task in
the queue will be executed. When there is only one task to be served in the computer system,
this single task will keep using CPU.Non-preemptive Shortest-Job-First (NSJF): NSJF schedules tasks in order of the length of
the tasks’ next CPU burst. No task could be preempted.Preemptive Shortest-Job-First (PSJF): NSJF schedules tasks in order of the length of the
tasks’ next CPU burst. When a new task arrives, if the next CPU burst of the new task is
shorter than what is left of the currently-executing task, PSJF will preempt the currentlyexecuting task.
。。。