Write a command-line program (no GUI) that performs the following algorithms on a set of tasks: Algorithms
Fantastic news! We've Found the answer you've been seeking!
Question:
Algorithms
1. FIFO - tasks are executed to completion in the order they are added.
2. Shortest - the shortest task is executed to completion, then the next shortest task, etc.
3. Round Robin - each task is executed for one unit of time in a rotation.
Tasks should be objects. A task is created with a duration that determines how long it should execute. Tasks also have names and know how long they have executed.
Each scheduler should be an object derived from an abstract scheduler class. A scheduler will accept and run a list of tasks. Running a task simply adds to the amount of time the task has been executing. New tasks cannot be added once a scheduler begins running the tasks.
A separate class called "TestScheduler" should be created. It should be able to read in the name and duration of each task from a file called "tasks.txt". It should create an object for each scheduler, and an object for each task, and run the set of tasks with each scheduler.
Related Book For
Numerical Methods With Chemical Engineering Applications
ISBN: 9781107135116
1st Edition
Authors: Kevin D. Dorfman, Prodromos Daoutidis
Posted Date: