Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

1. Language that will be used and implementation plan (i.e. using student linked

ID: 3593618 • Letter: 1

Question

1. Language that will be used and implementation plan (i.e. using student linked list class developed in COP 3530, using standard library, both algorithms implemented in one executable or separate executable files, etc.)

2. Partial Gantt chart for FCFS, AT LEAST 300 TIME UNITS

3. PROGRAM FLOW LOGIC FOR FCFS

4. Partial Gantt chart for MLFQ, AT LEAST 300 TIME UNITS

5. PROGRAM FLOW LOGIC FOR MLFQ

6. Early version of code to indicate the learner is starting the project

ALGORITHMS:

1. FCFS nonpreeemptive

2. MLFQ

Explanation / Answer

1.In FCFS scheduling the processes are allocated the cpu in the order of their arrival.The first process in the ready queue gets executed first and the second one starts only when the first process finishes execution.

Algorithm:

1.Input the processes along with their burst times.

2.calculate the waiting time of the processes,the waiting time of first process is zero.

for other process i,it will be w[i]=b[i-1]+w[i-1]

3.calculate Turn around time=waiting time+burst time for all processes.

4.Calculate average waiting time as total waiting time/no of processes

5.Calculate average turn around time as total turnaround time/no of processes.

MLFQ

In multi level feedback queue the processes are placed in various queues with repect to priority,The scheduler first starts with queue q0 followed by q1 and q2 only when q0 is empty.when running a process in q1 a new process comes in q0,the current process is preempted and scheduler executes q0.

any job entering will be first placed in queue q0,where it isgiven a time slice of 8ms,if the job doesnt complete it is pushed to queue q1 where it is given a time slice of 16 ms,if the job fails it is pushed to queue q3 where jobs are performed in fcfs manner.meansjobs which require less than8 secs of cpu are serviced first and those requring between 16 to 24 get a fair share of cpu compared to jobs needing more than 24 secs.

various parameters define MLFQ

1.The number queues

2.Scheduling algorithm for each queue

3.When to demote a job to lower queue

4.When to promote a job to upper queue

5The method Determining the queue to enter

Algorithm

1.When a job enters the system,place it in top most queue.

2.When the job uses its entire time slice,move down one queue

3.When the jobgives up cpu with in time slice,stay in the same level.

4.After some time move all the jobs to the top most queue