Sale!

CS3500 Lab 4 CPU Scheduling Solved

Original price was: $40.00.Current price is: $35.00. $29.75

Category:

Description

5/5 - (1 vote)

CPU Scheduling

Multilevel Queue Scheduling

A multilevel queue scheduling algorithm partitions the ready queue into several separate queues. The
processes are permanently assigned to one of the queues, generally based on some property of the
process, such as memory size, process priority, or process type. Each queue has its own scheduling
algorithm.

You have to implement a multilevel queue scheduling algorithm with five queues, listed below:

1. System processes (sys)
2. Interactive processes (ip)
3. Interactive editing processes (iep)
4. Batch processes (bp)
5. Student processes (std)

Each type of process is given a time slice of CPU to run its processes. That is each queue runs in a round
robin fashion. System process runs in a priority scheduling manner. Interactive and interactive editing
process will work on FCFS basis. Batch and student process on SJF scheduling. Assume that all processes
are preemptive

You are supposed to find the sequence the CPU schedules the process for execution. And calculate
Completion Time, Waiting Time, Turnaround Time for each process
Completion Time: Time at which process completes its execution.
Turn Around Time: Time Difference between completion time and arrival time.
Turn Around Time = Completion Time – Arrival Time

CPU Scheduling

Waiting Time (W.T): Time Difference between turnaround time and burst time.
Waiting Time = Turn Around Time – Burst Time
Inputs:
Round Robin Quantum Time
No. of Process: N integer

process_id, arrival_time, burst_time and type_of_process, priority.
In case of processes without priority, priority=0
Expected output:
Process Execution Sequence
Process_id, Completion_time, TAT, WT

Sample Test Case:
Input
Quantum = 3
p1 0 3 sys 1
p2 0 2 ip 0
p3 0 2 iep 0
p4 0 3 bp 0

p5 0 1 sp 0
p6 1 2 iep 0
p7 2 4 sys 2
p8 2 3 ip 0
p9 3 2 bp 0
p10 3 3 sp 0
p11 3 2 iep 0

p12 4 3 sys 4
p13 4 2 sys 3
p14 5 3 ip 0
p15 6 5 ip 0

p16 6 3 bp 0
p17 6 2 bp 0
p18 7 5 sp 0
p19 9 2 ip 0
p20 10 2 sp 0

Note: you may save this as file for ease of running the program
Output Sequence:
P1 P2 P8 P3 P6 P9 P17 P5 P20
0 3 5 6 8 9 11 12 13 15

P7 P8 P14 P6 P11 P17 P4 P10 P7
18 20 21 22 24 25 27 30 31
P13 P14 P15 P4 P16 P18 P12 P15 P16
33 35 36 37 39 42 45 48 49
P18 P15 P19
51 52 54

Note:

Calculate Completion Time, Waiting Time, Turnaround Time for each process using standard
method

CPU Scheduling