Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Implement the following 3 CPU scheduling algorithms (Please do this in the language of C++) Simulate and Evaluate each with the set of processes below.

Implement the following 3 CPU scheduling algorithms (Please do this in the language of C++)

Simulate and Evaluate each with the set of processes below.

FCFS non-preemptive ( partial results provided)

MLFQ (partial results provided)

Multilevel Feedback Queue (preemptive absolute priority in higher queues)

Queue 1 uses RR scheduling with Tq = 6

Queue 2 uses RR scheduling with Tq = 12

Queue 3 uses FCFS

All processes enter first queue 1. If time quantum (Tq) expires before CPU burst is complete, the process is downgraded to next lower priority queue. Processes are not downgraded when preempted by a higher queue level process. Once a process has been downgraded, it will not be upgraded.

Assumptions:

All processes are activated at time 0

Assume that no process waits on I/O devices.

After completing an I/O event, a process is transferred to the ready queue.

Waiting time is accumulated while a process waits in the ready queue.

Process Data: process goes {CPU burst, I/O time, CPU burst, I/O time, CPU burst, I/O time,.., last CPU burst}

P1 { 6, 17, 8, 19, 12, 31, 11, 18, 9, 22, 8, 26, 10 }

P2 { 19, 38, 11, 24, 15, 21, 12, 27, 12, 34, 11, 34, 9, 29, 9, 31, 7}

P3 { 3, 37, 14, 41, 8, 30, 4, 19, 7, 33, 5, 18, 4, 26, 5, 31, 16}

P4 { 15, 35, 14, 41, 16, 45, 18, 51, 14, 61, 13, 54, 16, 61, 15}

P5 { 9, 24, 7, 21, 15, 31, 6, 26, 7, 31, 3, 18, 6, 21, 6, 33, 3}

P6 { 4, 38, 3, 41, 5, 29, 4, 26, 7, 32, 4, 22, 3, 26, 5, 22, 8}

P7 { 14, 36, 17, 31, 16, 32, 15, 41, 14, 42, 17, 39, 16, 33, 15}

P8 { 5, 14, 4, 33, 6, 31, 4, 31, 6, 27, 5, 21, 4, 19, 6, 11, 6}

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions

Question

Language in Context?

Answered: 1 week ago