
Scheduling Algorithms
This project involves implementing several different process scheduling algorithms. The scheduler will be assigned a predefined set of tasks and will schedule the tasks based on the selected scheduling
-
First-come, first-served (fcfs), which schedules tasks in the order in which they request the CPU .
-
Shortest-job-first (sjf), which schedules tasks in order of the length of the tasks’ next CPU burst.
-
Priority scheduling (pri), which schedules tasks based on priority.
-
Round-robin (rr) scheduling, where each task is run for a time quantum (or for the remainder of its CPU burst).
-
Priority with round-robin (pri-rr), which schedules tasks in order of priority and uses round-robin scheduling for tasks with equal priority.
Priorities range from 1 to 10, where a higher numeric value indicates a higher relative priority. For round-robin scheduling, the length of a time quantum is 10 milliseconds.
Implementation
-
The implementation of this project may be completed in any programming language (although Python or Java recommended)
-
The tasks are kept on a file and has the form [task name] [arrival time] [priority] [ CPU burst], with the following example format:
T1, 1, 4, 20
T2, 4, 2, 25
T3, 6, 3, 25
T4, 2, 3, 15
T5, 5, 10, 10
-
The program should read the name of the scheduler algorithm and the task file as command line input and produce a text file named “output.txt” with the following example output:
>> java Schedule fcfs schedule.txt
>> cat output.txt
First Come First Serve Scheduling
Will run Name: T1
Priority: 4
Burst: 20
Task T1 finished
Will run Name: T4
Priority: 10
Burst: 15
Task T4 Finished
Will run Name: T2
Priority: 2
Burst: 25
Task T2 Finished
Will run Name: T5
Priority: 10
Burst: 10
Task T5 Finished
Will run Name: T3
Priority: 3
Burst: 25
Task T3 Finished
Bonus:
- Calculate and print the average turnaround time and waiting time or each of the scheduling algorithms.

Trending nowThis is a popular solution!
Step by stepSolved in 4 steps

- There is a computer system that intends to service multiple users. All tasks from the users have almost the same length (i.e. CPU time), usage of the system resources, and urgency. The tasks may arrive in the system at different time. During the execution, all tasks do not require user interventions. 1. What CPU scheduling algorithm would you choose? 2. Explain your choice.arrow_forwardExercises - Scheduling Score: 7.8/20 3/10 answered Question 4 Using the priority list T4, T1, T7, T9, T8, T6, T2, T5, T3, schedule the project below with two processors. Task Time Required Tasks that must be completed first T1 6 T2 7 T3 9 T4 10 T1 T5 12 T1 T6 2 T2, T3 T7 6 T4, T5 T8 6 T5, T6 T9 11 T5, T6 Task 5 is done by Select an answer starting at time Task 8 is done by Select an answer starting at time The finishing time for the schedule is Progress 0.arrow_forwardMain Memory (MM) and Central Processing Unit are important resources of the computer system that must be carefully managed. The part of Operating System (OS) that manages the memory is called Memory Manager. 'Partition' is a memory management scheme, which allocates processes in MM into a unique fixed-size partition; each partition contains exactly one process. When a partition is free, the OS selects a process from the input queue and loads it into the free partition; when the process terminates, the partition becomes available; a free partition is called 'hole'. Please, reply to the following questions by giving your own ORIGINAL and UNIQUE answers: a) Draw a picture of the Main Memory (MM) divided into A 'assigned partitions' and B 'holes': fix your values for A and B1, and draw the corresponding MM layout. In the following, Pi, Pj and Pk are three processes residing in MM b) Considering the 7 states diagram, answer to the following questions: 1) Can Pi be in the 'New' state? Why?…arrow_forward
- Computer Networking: A Top-Down Approach (7th Edi...Computer EngineeringISBN:9780133594140Author:James Kurose, Keith RossPublisher:PEARSONComputer Organization and Design MIPS Edition, Fi...Computer EngineeringISBN:9780124077263Author:David A. Patterson, John L. HennessyPublisher:Elsevier ScienceNetwork+ Guide to Networks (MindTap Course List)Computer EngineeringISBN:9781337569330Author:Jill West, Tamara Dean, Jean AndrewsPublisher:Cengage Learning
- Concepts of Database ManagementComputer EngineeringISBN:9781337093422Author:Joy L. Starks, Philip J. Pratt, Mary Z. LastPublisher:Cengage LearningPrelude to ProgrammingComputer EngineeringISBN:9780133750423Author:VENIT, StewartPublisher:Pearson EducationSc Business Data Communications and Networking, T...Computer EngineeringISBN:9781119368830Author:FITZGERALDPublisher:WILEY





