2/27/2011

BCS1333 CPU Scheduling Exercise

Note Chapter 5 : CPU Scheduling Willey

TRUE/FALSE

  1. Process execution begins with a CPU burst. That is followed by an an I/O burst, which is followed by another CPU burst, then another I/O burst, and so on. [ T / F ]
  2. CPU scheduling is the task of selecting a waiting process from the ready queue and allocating the CPU to it.[ T / F ]
  3. The Final CPU burst ends with a system request to terminate execution.[ T / F ]
  4. The simplest CPU-scheduling algorithm is first-come, first-served.[ T / F ]
  5. Implementing Short Job First (SJF) scheduling is difficult because predicting the length of the next CPU burst is difficult.[ T / F ]
  6. Both priority and SJF scheduling may suffer from starvation.[ T / F ]
  7. Aging is the technique to prevent starvation.[ T / F ]
  8. Round-Robin (RR) is similar to FCFS except it has time quantum.[ T / F ]
  9. The average waiting time under the Round-Robin is often long.[ T / F ]
  10. THE FCFS algorithm is nonpreemptive; the RR is preemptive. [ T / F ]

SHORT ANSWER

  1. There a re five (5) criterion that have been suggested for comparing CPU scheduling algorithms. List and briefly explain each of them.

    ________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________

  2. Consider the following set of processes that arrive at time 0, with the length of the CPU burst given in miliseconds:


Process Burst Time Priority

P1 15 3

P2 10 1

P3 3 3

P4 5 2

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

  1. Draw four Gantt ccharts that illustrate the execution of these processes using the following scheduling algorithms : FCFS, SJF, nonpreemptivr priority ( a smaller priority number implies a higher priority), and RR (quantum = 3).

    ________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________


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

    ________________________________________________________________________________________________________________________________________________________________


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

    ________________________________________________________________________________________________________________________________________________________________


  4. Which of the algorithms in part a results in the minimum average waiting time (over all processes)?

    ________________________________________________________________________________________________________________________________________________________________


  1. In priority scheduling, priorities can be defined either internally or externally. Briefly explain what is internal priorities and what is external priorities.

    ________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________


  1. What is major problem with priority scheduling and what is the solution?

    ________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________



No comments:

Cara download Installer windows 10 dalam format ISO

1. Jika anda bercadang untuk download windows 10 melalui website rasmi windows - pilihan untuk download dalam format ISO tidak di berikan.  ...