Professional Documents
Culture Documents
Tem Numerical
Tem Numerical
processes that arrive at time 0, with the length of CPU burst time given in m-sec. Also, calculate
the average waiting time.
Example 2: Draw the Gantt chart, using SJF scheduling for the given data. Also calculate the
average waiting time.
Example 3: Using pre-emptive SJF scheduling, draw the Gantt chart and calculate the average
waiting time for the given data.
Example 4: Schedule the given processes using priority scheduling when all the processes at the
time zero, in order P1, P2, ---- P5, with the length of CPU burst time given in milliseconds:
This study source was downloaded by 100000841649675 from CourseHero.com on 04-03-2024 15:25:51 GMT -05:00 Page | 1
https://www.coursehero.com/file/225758807/Tem-Numericaldocx/
Example 5: Consider the following set of processes that arrives at time 0 ms.
Example 6: Consider the following set of processes that arrive at time zero, with the length of
CPU burst time given in milliseconds:
Example 7: For the given five processes arriving at time zero, in the order given with the length
of CPU burst time in milliseconds:
Example 8: Consider the following four processes with the length of the CPU burst time in
millisecond:
This study source was downloaded by 100000841649675 from CourseHero.com on 04-03-2024 15:25:51 GMT -05:00 Page | 2
https://www.coursehero.com/file/225758807/Tem-Numericaldocx/
Find out which of the following algorithms gives the least average waiting time for the above
worked:
i. FCFS
ii. RR (Slice = 4 ms)
iii. SRTF
Example 9: Consider the following set of processes, with the length of the burst time given in
milliseconds:
a) Draw four Gantt charts illustrating the execution of these processes using FCFS, SJF, a
non pre-emptive priority (a smaller priority number implies a higher priority), and RR
(Quantum = 1) scheduling.
b) What is the turnaround time of each process for each of the scheduling algorithm in part
a?
c) What is the waiting time of each process for each of the scheduling algorithm in part a?
d) Which of the schedules in part a results in the minimal average waiting time (overall
processes)?
Example 10: Consider the following set of processes having their burst time mentioned in
milliseconds. CPU bust time indicates that for how much time, the process needs the CPU.
i. P1, P2, P3
ii. P2, P3, P1
This study source was downloaded by 100000841649675 from CourseHero.com on 04-03-2024 15:25:51 GMT -05:00 Page | 3
https://www.coursehero.com/file/225758807/Tem-Numericaldocx/
iii. P3, P1, P2
iv. P3, P2, P1
Example 11:
Example 12: Consider the following set of processes, assumed to have arrived at time 0, in the
order P1, P2, P3, ----, P5, with the length of CPU bust time given in milliseconds:
Example 13:
Example 14: Consider the set of processes given in the table and the following scheduling
algorithm:
This study source was downloaded by 100000841649675 from CourseHero.com on 04-03-2024 15:25:51 GMT -05:00 Page | 4
https://www.coursehero.com/file/225758807/Tem-Numericaldocx/
Process Arrival Time Burst Time
A 00 07
B 01 05
C 02 03
D 06 02
E 12 03
If there is a tie within the processes, the tie is broken in the favor of the oldest process. Draw the
Gantt chart and find the average waiting time and turnaround time for two algorithms. Comment
on your result which one is better and why?
Example 15: Consider a system with a set of processes P1, P2 and P3 and their CPU burst times,
priorities and arrival times being mentioned as below:
i. Average waiting time using FCFS, SJF (Preemptive and non-preemptive) and priority
(preemptive and non-preemptive) scheduling mechanism.
ii. Average turnaround time using FCFS, SJF (Preemptive and non-preemptive) and priority
(preemptive and non-preemptive) scheduling mechanism.
iii. Assume time quantum to be 2 units of time. Calculate average waiting time and average
turnaround time using RR scheduling.
Example 16: For the following table draws a chart illustrating their execution using:
i. FCFS
ii. SJF
iii. SRTF
iv. RR (quantum = 2)
v. RR (quantum = 1)
This study source was downloaded by 100000841649675 from CourseHero.com on 04-03-2024 15:25:51 GMT -05:00 Page | 5
https://www.coursehero.com/file/225758807/Tem-Numericaldocx/
Powered by TCPDF (www.tcpdf.org)