Process scheduling
Download
1 / 8

Process Scheduling - PowerPoint PPT Presentation


  • 141 Views
  • Uploaded on

Process Scheduling. Ch.5. Exercise 5.13. Consider the following set of processes, with the length of the CPU-burst time given in milliseconds: The processes are assumed to have arrived in the order P1, P2, P3, P4, P5, all at time 0.

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about 'Process Scheduling' - laszlo


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript

Exercise 5 13
Exercise 5.13

Consider the following set of processes, with the length of the CPU-burst time given in milliseconds:

The processes are assumed to have arrived in the order P1, P2, P3, P4, P5, all at time 0.

a. Draw four Gantt charts illustrating the execution of these processes using FCFS, SJF, a non-preemptive priority (a smaller priority number implies a higher priority), and RR (quantum = 1) scheduling.

b. What is the turnaround time of each process for each of the scheduling algorithms in part a?

c. What is the waiting time of each process for each of the scheduling algorithms in part a?

d. Which of the schedules in part a results in the minimal average waiting time (over all processes)?.


Exercise 5 17
Exercise 5.17

. 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.

(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.


Exercise 5 9
Exercise 5.9

  • Which of the following scheduling algorithms could result in starvation?

    a. First-come, first-served

    b. Shortest job first

    c. Round robin

    d. Priority


Exercise 5 7
Exercise 5.7

  • Explain the differences in the degree to which the following scheduling algorithms discriminate in favor of short processes:

    a. FCFS

    b. RR

    c. Multilevel feedback queues


Exercise 5 8
Exercise 5.8

Consider the exponential average formula used to predict the length of the next CPU burst. What are the implications of assigning the following values to the parameters used by the algorithm?

a. α= 0 and Tn= 100milliseconds

b. α= 0.99 and Tn = 10milliseconds


Exercise 5 4
Exercise 5.4

  • What advantage is there in having different time-quantum sizes at different levels of a multilevel queuing system?


Exercise 5 1
Exercise 5.1

  • What is important for the scheduler to distinguish I/O-bound programs from CPU- bound programs ?