0% found this document useful (0 votes)
2 views

Working With CPU Scheduling Algorithms

The document outlines tasks related to CPU scheduling algorithms, specifically focusing on First-Come, First-Served (FCFS) and Shortest Job First (SJF) methods. It includes instructions for calculating Gantt charts, waiting times, turnaround times, and average metrics for given processes with specific burst and arrival times. Additionally, it discusses implementing the Shortest Remaining Time First (SRTF) algorithm for a set of jobs with their respective arrival and burst times.

Uploaded by

abvrasikder
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

Working With CPU Scheduling Algorithms

The document outlines tasks related to CPU scheduling algorithms, specifically focusing on First-Come, First-Served (FCFS) and Shortest Job First (SJF) methods. It includes instructions for calculating Gantt charts, waiting times, turnaround times, and average metrics for given processes with specific burst and arrival times. Additionally, it discusses implementing the Shortest Remaining Time First (SRTF) algorithm for a set of jobs with their respective arrival and burst times.

Uploaded by

abvrasikder
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

Working with CPU Scheduling algorithms

1. Given the list of processes, their CPU burst times and arrival time, display/print the
Gantt chart for FCFS. Compute the waiting time and turnaround time for each
processor. Print the table of information which contains process name, execution time,
waiting time and turnaround time. Finally print the average waiting time and average
turnaround time.
Process Burst Time Arrival Time
P1 12 0
P2 25 2
P3 13 1
P4 7 0
P5 11 5

2. Write a C program to implement Shortest Job First CPU scheduling algorithm where
Processes do not arrive at the same time. Display the following results in a table format.
i) Arrival time and Burst time of every process.
ii) Waiting time and turnaround time of every process.
iii) Average waiting time and turnaround time.
iv) Total idle time of the processor.
Process Burst Time
P1 12
P2 22
P3 14
P4 7
P5 10

3. Consider the following 4 jobs P1, P2, P3, and P4. Their arrival time and burst time
are given below in the table.
Job Arrival Time Burst Time
1 0 7
2 1 4
3 3 9
4 4 5

Compute the completion time, Turn Around Time, Waiting Time and Response
Time using Shortest Remaining Time First (SRTF) Scheduling Algorithm

You might also like