Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a command-line program (no GUI) that performs the following algorithms on a set of tasks: Algorithms 1. FIFO - tasks are executed to completion

Write a command-line program (no GUI) that performs the following algorithms on a set of tasks:

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.

Step by Step Solution

3.45 Rating (148 Votes )

There are 3 Steps involved in it

Step: 1

Below is a simple Python implementation for the described commandline program Please note that you s... blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Numerical Methods With Chemical Engineering Applications

Authors: Kevin D. Dorfman, Prodromos Daoutidis

1st Edition

1107135117, 978-1107135116

More Books

Students also viewed these Operating System questions