54.6k views
0 votes
This programming assignment 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 algorithm. Each task is assigned a priority and CPU burst. The following scheduling algorithms will be implemented:

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, 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).
Fair share scheduling, which schedules tasks based on their user and assigns each user the same time quantum for their tasks.
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. Calculate the average turnaround time, and waiting time for each of the scheduling algorithms.
Fair share scheduling description
The-share scheduling policy works as follow:
Several users may exist in the system and each user may own several processes. In each scheduling cycle the scheduler distributes a predefined time quantum of CPU between different users and processes.
At any scheduling cycle the scheduler distributes the time quantum equally between different users that have at least one process ready for execution.
Furthermore, the scheduler distributes each user's time share equally between processes that belong to
that user
The order which the processes will be scheduled in one cycle is not important, i.e. there is no priority on users and processes. For this scheduler, the second column of the input represents the user id instead of the priority.
Input
The schedule of tasks has the form [task name] [priority or user_id] [CPU burst], with the following example format:
T1, 4, 20
T2, 2, 25
T3, 3, 25
T4, 3, 15
T5, 10, 10

User Jeff Weber
by
8.4k points

1 Answer

3 votes

Final answer:

This assignment involves implementing several process scheduling algorithms including FCFS, SJF, Priority scheduling, RR, and Fair share scheduling.

Step-by-step explanation:

Process Scheduling Algorithms

In this programming assignment, you will be implementing several different process scheduling algorithms. The algorithms to be implemented are First-come, first-served (FCFS), Shortest-job-first (SJF), Priority scheduling, Round-robin (RR), and Fair share scheduling.

First-come, first-served (FCFS)

This algorithm schedules tasks in the order in which they request the CPU. The task that requests the CPU first will be scheduled first.

Shortest-job-first (SJF)

This algorithm schedules tasks based on the length of their next CPU burst. The task with the shortest burst will be scheduled first.

Priority scheduling

This algorithm schedules tasks based on their priority. A higher priority value indicates a higher relative priority. In case of a tie, the order in which the tasks arrive is considered.

Round-robin (RR) scheduling

This algorithm assigns a fixed time quantum of 10 milliseconds to each task. Each task is run for the time quantum or for the remainder of its CPU burst, whichever is shorter.

Fair share scheduling

This algorithm distributes a predefined time quantum of CPU equally between different users and processes. It assigns each user the same time quantum for their tasks.

User Leon Young
by
7.7k points