06_Task_Performance_1(5)

Download as pdf or txt
Download as pdf or txt
You are on page 1of 3

IT2105

Task Performance
Process Scheduling
Objectives:

At the end of the exercise, the students should be able to:

▪ Analyze the different types of process scheduling for an operating system; and
▪ Test the efficiency of some scheduling algorithms by comparing the turnaround time and/or wait time of
the process.

Instructions:

Process E F G H I J K
Arrival Time 0 2 3 5 11 17 24
Bust Time 4 9 3 7 5 6 12

• First-Come First-Serve

o Calculate Finish Time: Start with the first process, add its burst time to get the finish time, and
then continue to the next process.
o Calculate Turnaround Time: For each process, subtract the arrival time from the finish time.
o Calculate Waiting Time: For each process, subtract its burst time from its turnaround time.

• Shortest Remaining Time First

o Track Remaining Burst Times for each process.


o Re-evaluate at each step to see which process has the least time left.
o Calculate finish, turnaround, and waiting times after all processes are completed.

• Round Robin: Quantum = 3

o Process Each in Quantum Slices: Deduct 3 from the remaining burst time each time a process gets the
CPU.
o If the remaining burst time of a process is less than the quantum, run it for the remaining time.
o Repeat this cycle until all processes are finished.
o Calculate finish, turnaround, and waiting times for each process.

2. For each process scheduling algorithm, provide the following:


a. A complete and detailed table that contains the following criteria for each process (10
points):
o Finish time
o Turnaround time
o Waiting time

Process Arrival Time Burst Time Finish Time Turnaround Waiting


Time Time
E 0 4 4 4 0
F 2 9 13 11 0
G 3 3 16 13 10
H 5 7 23 18 11
I 11 5 28 17 12
J 17 6 34 17 11
K 24 12 46 22 10

b. A detailed Gantt Chart (5 points)

c. The average turnaround time (3 points)

Average Turnaround Time = Sum of turnaround times / Total processes

d. The average waiting time (2 points)

Average Waiting Time = Sum of waiting times / Total processes

3. Then, answer the following items (5 items x 5 points):

a. Among the three (3) process scheduling algorithms that you have performed, which do
you think is the most efficient and why?

SRTF is generally the most efficient in minimizing waiting and turnaround times since it
prioritizes shorter tasks. However, it requires complex tracking of remaining burst times.

b. Cite significant differences in the results of applying the First-Come First-Serve


algorithm and Round Robin algorithm. Elaborate on your answer.

FCFS schedules based on arrival order, which can lead to long waiting times if a long process
arrives first (convoy effect). Round Robin improves responsiveness by sharing CPU time
more fairly among processes, especially when there are interactive tasks.

c. What could possibly happen if the value of the Quantum in Round Robin is increased
to 5? Elaborate on your answer.

Increasing the quantum to 5 would reduce context switching overhead, potentially improving
CPU efficiency. However, it could also lead to higher waiting times for shorter tasks since they
might need to wait longer for their turn.
d. In your opinion, why does the average turnaround time and waiting time vary per
algorithm?

Different algorithms prioritize processes differently. FCFS strictly follows arrival order, SRTF
minimizes wait by focusing on shorter tasks, and Round Robin shares CPU time equally. These
strategies affect the time each process waits and finishes.

e. Would you suggest the utilization of the Round Robin algorithm for process scheduling
in a file management system? Why or why not?

Round Robin is typically not ideal for file management because it may lead to increased wait
times and inefficiencies when dealing with file operations that require quick sequential access.
A priority-based or shortest job first approach could be more suitable.

Grading rubric for the table (2.a):


Performance Indicator Points
The table contains complete and correct values for the finish time, turnaround time, and waiting time. 10
There are only two to four incorrect values in the table. 7
Only half of the table contains the correct values. 5
There are only two to four correct values in the table. 3

Grading rubric for the Gantt Chart (2.b):


Criteria Performance Indicator Points
Content Correct process labels and scheduling criteria are included in the chart. 3
Organization The chart was presented in an organized manner. 2
TOTAL 5

Grading rubric for the essay:


Criteria Performance Indicator Points
Content Correct ideas, concepts, and/or examples were included. 3
Organization The presentation of the idea was generally organized. 2
TOTAL 5
Note: DO NOT COPY AND PASTE. All students who copy and paste their work from any website or their classmates will automatically receive a failing mark for this assessment task.

06 Task Performance 1 *Property of STI


Page 1 of 1

You might also like