Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1. Define the difference between preemptive and non-preemptive scheduling (15 points) 2. Suppose that the following processes arrive for execution at the times indicated. Each

image text in transcribed
1. Define the difference between preemptive and non-preemptive scheduling (15 points) 2. Suppose that the following processes arrive for execution at the times indicated. Each process will run the listed amount of time. In answering the questions, use non-preemptive scheduling and base all decisions on the information you have at the time the decision must be made. Process 0.0 0.5 P2 P3 a. What is the average turnaround time for these processes with the FCFS scheduling algorithm? b. What is the average turnaround time for these processes with the SJF scheduling algorithm? c. The SJF algorithm is supposed to improve performance, but notice that we chose to run process P1 at time 0 because we did not know that two shorter processes would arrive soon. Compute what the average turnaround time will be if the CPU is left idle for the first 1 unit and then SJF scheduling is used. Remember that processes P1 and P2 are waiting during this idle time, so their waiting time may increase. This algorithm could be known as future- knowledge scheduling (30 points) 3. Calculate average waiting time for RR (round robin) scheduling, for Processes: P: 16 P2:4 P3: 10 Assume above order in ready queue; P1 at head of ready queue Quantum 4 context switch time- 1 ms (25 points) 4. Compute the average wait, turnaround and response time using FCFS scheduling for the following processes, assuming that a context switch consumes 2 ms. Process Burst Time Arrival Time 23 13 35 0 P2 P3 17 23 Same but assume non-preemptive SJHF Same but assume preemptive SJF Same but assume Round Robin with quantum 15 ms (30 points)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered 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