CPU Scheduling Algorithm Practice

Descripción

CPU Scheduling Algorithm Practice for First-come-first-serve, Shortest-Job-First, and Round-Robin and etc.
Cpu Scheduling
Fichas por Cpu Scheduling, actualizado hace más de 1 año
Cpu Scheduling
Creado por Cpu Scheduling hace más de 8 años
311
0

Resumen del Recurso

Pregunta Respuesta
1. Assume that the following jobs are to be executed on a single processor system ------------------------------------------------------ Job-Id | Burst Time -------------------------------------------------------- p | 4 q | 1 r | 8 s | 1 t | 2 --------------------------------------------------------- The jobs are assumed to have arrived at time 0 and in the order p, q, r, s, t. Calculate the departure time (completion time) for job p if scheduling is round robin with time slice 1. Ans: 11
2. Consider the following set of processes, with the arrival times and the CPU burst times given in milliseconds. ----------------------------------------------------------- Process | Arrival-Time | Burst-Time ----------------------------------------------------------- P1 | 0 | 5 P2 | 1 | 3 P3 | 2 | 3 P4 | 4 | 1 ----------------------------------------------------------- What is the average turnaround time for these processes with the preemptive shortest remaining processing time first (SROT) algorithm?
3. An operating system uses Shortest Remaining Time first (SRT) process scheduling algorithm. Consider the arrival times and execution times for the following processes: ----------------------------------------------------------- Process| Execution time| Arrival time ----------------------------------------------------------- P1 | 20 | 0 P2 | 25 | 15 P3 | 10 | 30 P4 | 15 | 45 ----------------------------------------------------------- What is the total waiting time for process P2?
4. Consider the following table of arrival time and burst time for three processes P0, P1 and P2. ----------------------------------------------------------- Process | Arrival time | Burst Time ----------------------------------------------------------- P0 | 0 ms | 9 ms P1 | 1 ms | 4 ms P2 | 2 ms | 9 ms ----------------------------------------------------------- The pre-emptive shortest job first scheduling algorithm is used. Scheduling is carried out only at arrival or completion of processes. What is the average waiting time for the three processes?
5. First-Come, First-Served (FCFS) Scheduling ----------------------------------------------------------- Process | Burst Time ----------------------------------------------------------- P1 | 24 P2 | 3 P3 | 3 ----------------------------------------------------------- Suppose that the processes arrive in the order: P1 , P2 , P3 Calculate average waiting time.
6. Shortest-Job-First (SJF) (Non-Preemptive) ----------------------------------------------------------- Process | Arrival Time | Burst Time ----------------------------------------------------------- P1 | 0 | 7 P2 | 2 | 4 P3 | 4 | 1 P4 | 5 | 4 ----------------------------------------------------------- Calculate average waiting time.
7. Preemptive SJF ----------------------------------------------------------- Process | Arrival Time | Burst Time ----------------------------------------------------------- P1 | 0 | 7 P2 | 2 | 4 P3 | 4 | 1 P4 | 5 | 4 ----------------------------------------------------------- Calculate average waiting time.
8. Say we have the process arrival time chart given below. ----------------------------------------------------------- Process| Arrival time| Burst Time ----------------------------------------------------------- P1 | 0 |16 P2 | 0 |10 P3 | 6 | 4 P4 | 7 | 6 P5 | 8 |10 ----------------------------------------------------------- Draw a Gantt chart to illustrate how these processes would be scheduled using Round Robin (RR).Assume that the quantum is set to 5 time units.
Mostrar resumen completo Ocultar resumen completo

Similar

Operating System
Faheem Ahmed
Errores Radiográficos
Omayra Cosme
Operating System
Alexander Nevill
Implementation Methods
Amy Dang
Operating System
Kai Stovell Unkn
Operating Systems
David Lee
what are the main functions of an operating styem?
Oliver Cutcliffe
Software and Utilities
Adam Meese
Operating systems.
Nathan Tonkin
P01 Quiz
Syabil Hafizdini
Effective Citzens
Awmeo Azad