Question: Simulate and evaluate each with the set of eight processes below in c++ . 1.FCFS non-preemptive (results provided) Assumptions : 1. All processes are activated

Simulate and evaluate each with the set of eight processes below in c++.

1.FCFS non-preemptive (results provided)

Assumptions:

1. All processes are activated at time 0

2. Assume that no process waits on I/O devices.

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

4. 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 {4,24,5,73,3,31,5,27,4,33,6,43,4,64,5,19,2}

P2 {18,31,19,35,11,42,18,43,19,47,18,43,17,51,19,32,10}

P3 {6,18,4,21,7,19,4,16,5,29,7,21,8,22,6,24,5}

P4 {17,42,19,55,20,54,17,52,15,67,12,72,15,66,14}

P5 {5,81,4,82,5,71,3,61,5,62,4,51,3,77,4,61,3,42,5}

P6 {10,35,12,41,14,33,11,32,15,41,13,29,11}

P7 {21,51,23,53,24,61,22,31,21,43,20}

P8 {11,52,14,42,15,31,17,21,16,43,12,31,13,32,15}

*********************************************************************************************************************************************

using 2d vector called process to store values.

void process(vector> p) {

p = { {4, 24, 5, 73, 3, 31, 5, 27, 4, 33, 6, 43, 4, 64, 5, 19, 2},

{ 18,31,19,35,11,42,18,43,19,47,18,43,17,51,19,32,10 },

{ 6,18,4,21,7,19,4,16,5,29,7,21,8,22,6,24,5 },

{ 17,42,19,55,20,54,17,52,15,67,12,72,15,66,14},

{5,81,4,82,5,71,3,61,5,62,4,51,3,77,4,61,3,42,5},

{ 10,35,12,41,14,33,11,32,15,41,13,29,11 },

{ 21,51,23,53,24,61,22,31,21,43,20 },

{ 11,52,14,42,15,31,17,21,16,43,12,31,13,32,15 }

};

}

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!