Note Chapter 5 : CPU Scheduling Willey
TRUE/FALSE
- 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 ]
- CPU scheduling is the task of selecting a waiting process from the ready queue and allocating the CPU to it.[ T / F ]
- The Final CPU burst ends with a system request to terminate execution.[ T / F ]
- The simplest CPU-scheduling algorithm is first-come, first-served.[ T / F ]
- Implementing Short Job First (SJF) scheduling is difficult because predicting the length of the next CPU burst is difficult.[ T / F ]
- Both priority and SJF scheduling may suffer from starvation.[ T / F ]
- Aging is the technique to prevent starvation.[ T / F ]
- Round-Robin (RR) is similar to FCFS except it has time quantum.[ T / F ]
- The average waiting time under the Round-Robin is often long.[ T / F ]
- THE FCFS algorithm is nonpreemptive; the RR is preemptive. [ T / F ]
SHORT ANSWER
- There a re five (5) criterion that have been suggested for comparing CPU scheduling algorithms. List and briefly explain each of them.
________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________
- 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.
- 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).
________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________
- What is the waiting time of each process of the scheduling algorithms in part a?
________________________________________________________________________________________________________________________________________________________________
- What is the turnaround time of each process of the scheduling algorithms in part a?
________________________________________________________________________________________________________________________________________________________________
- Which of the algorithms in part a results in the minimum average waiting time (over all processes)?
________________________________________________________________________________________________________________________________________________________________
- In priority scheduling, priorities can be defined either internally or externally. Briefly explain what is internal priorities and what is external priorities.
________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________
- What is major problem with priority scheduling and what is the solution?
________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________
No comments:
Post a Comment