SO s08 Ejercicios de Scheduling de Procesos

SO s08 Ejercicios de Scheduling de Procesos - Sistemas...

Info iconThis preview shows pages 1–17. Sign up to view the full content.

View Full Document Right Arrow Icon
Sistemas Operativos I Ing. Jorge Garza Murillo Sesión 8
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Ejercicios de scheduling de procesos
Background image of page 2
Conceptos clave Tiempos: Tiempo de CPU / Ráfaga de CPU Terminación Llegada Criterios de comparación (métricas): Turnaround Tiempo de espera Throughput
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Conceptos clave Parámetros (para la política de Scheduling) : Prioridad Quantum Cambio de contexto Tipos de política de scheduling: Expropiativas No expropiativas
Background image of page 4
Clasificación de políticas de scheduling Scheduling Expropiativo No expropiativo RR MLFQ SRT SJF HRN FCF S SJF  Expropiativo Priority Priority
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Nota importante Nota importante En todos los ejercicios a continuación, se pide calcular el turnaround promedio para la secuencia de jobs dada. En algunos casos, también se pide calcular el tiempo promedio de espera.
Background image of page 6
1. Utilizando Round-Robin con Q = 1 Nota - La letra representa el JOB y el número entre paréntesis su RÁFAGA DE CPU. Ejercicios t = 0 A (5) t = 2 D (2) t = 3 E (4) t = 5 G (1) B (3) F (3) C (1) JOB en el CPU A B C A B D E F A B G D E F A E F A E 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 Tiempo Llegadas Llegadas:
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
TT TLL TU TT - tiempo de terminación, TLL - tiempo de llegada, TU - turnaround 0 C (1) B (3) 1 A (4) C (1) 2 D (2) B (2) A (4) 3 F (3) E (4) D (2) B (2) 4 A (3) F (3) E (4) D (2) 5 G (1) B (1) A (3) F (3) E (4) 6 D (1) G (1) B (1) A (3) F (3) 7 E (3) D (1) G (1) B (1) A (3) Tiempo Cola de listos CPU A (5) B (3) C (1) A (4) B (2) D (2) E (4) F (3) C B G D F A E 3 0 3 10 0 10 11 5 6 12 2 10 17 3 14 18 0 18 19 3 16 TU promedio = 77 / 7 = 1 RR . . . . . . . . .
Background image of page 8
¿Cuál sería el tiempo de espera promedio? JOB A B C A B D E F A B G D E F A E F A E 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 Tiempo Llegadas Tiempo de espera A B C D E F G 2 + 4 + 5 + 2 = 13 1 + 2 + 4 = 7 2 = 2 3 + 5 = 8 3 + 5 + 2 + 2 = 12 4 + 5 + 2 = 11 5 = 5 Tiempo de espera promedio = 58/7 = 8.2
Background image of page 9

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
2. Usando SRT (Shortest Remaining Time) Expropiativo, Q = 1 t = 0 A (5) t = 2 D (2) t = 3 E (4) t = 5 G (1) B (3) F (3) C (1) C B D D B G B F E A 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 Tiempo Llegadas
Background image of page 10
TT TLL TU C D G B F E A 1 0 1 4 2 2 6 5 1 7 0 7 10 3 7 14 3 11 19 0 19 T = 48 / 7 = 6.85 Longitud Máxima de la cola de listos = 0 1 2 3 4 5 6 A (5) B (3) A (5) A (5) B (2) A (5) E (4) F (3) B (2) A (5) E (4) F (3) A (5) E (4) F (3) B (1) A (5) E (4) F (3) C (1) B (3) D (2) D (1) B (2) G (1) B (1) Tiempo Cola de listos CPU SRT . . . . . . . . . . .
Background image of page 11

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Calcule el tiempo de espera promedio C B D D B G B F E A 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 Tiempo LLegadas Tiempo de espera A B C D E F G 14 = 14 1 + 2 + 1 = 4 0 = 0 0 = 0 7 = 7 4 = 4 0 = 0 Tiempo de espera promedio = 29/7 = 4.1
Background image of page 12
3. Usando FIFO t = 0 A (5) t = 2 D (2) t = 3 E (4) t = 5 G (1) B (3) F (3) C (1) Tiempo A B C D E F G 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1718 19 20 21 A B C D E F G 5 0 5 8 0 8 9 0 9 11 2 9 15 3 12 18 3 15 19 5 14 Orden TT TLL TU (turnaround) TU promedio = 72/7 = 10.2
Background image of page 13

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
4. SJF vs SRT B(4) C(3) D(7) E(4) ---> Llegad 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 Tiempo A C B D E 8 11 15 22 26 F (no expropiativo), sin cambio de contexto SJF con cambio de contexto = 2 A C B D E 8 10 13 15 19 21 25 27 34 CC CC CC CC
Background image of page 14
SRT (igual a SJF expropiativo), CC = 2 JOB SJF SRT A B C D E (8 - 0) = 8 (19 - 2) = 17 (13 - 6) = 7 (34 - 14) = 20 (25 - 16) = 9 TU Prom. = 12.2 (29 - 0) = 29 (8 - 2) = 6 (13 - 6) = 7 (38 - 14) = 24 (22 - 16) = 6 TU Prom. = 14.4 A(8) C(3) D(7) E(4) LLEGADAS B(4) A C B E 0 2 4 6 8 10 13 15 16 18 22 24 29 31 38 CC CC CC A CC CC CC A D
Background image of page 15

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Anexos
Background image of page 16
Image of page 17
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 09/30/2011 for the course SISTEMAS O 1 taught by Professor Garza during the Spring '11 term at ITESM.

Page1 / 62

SO s08 Ejercicios de Scheduling de Procesos - Sistemas...

This preview shows document pages 1 - 17. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online