Professional Documents
Culture Documents
Actividad2 1
Actividad2 1
(Actividad 2)
Sistemas Operativos
Bogotá, Colombia
2
cmd de windows
Información de la BIOS
Mostrar IP
calcular días, meses, minutos y segundos de una fecha (DD/MM/YYYY) a la fecha actual
Con los resultados obtenidos realizar una tabla demostrativa en Word para así dar respuesta
al punto de la guía
Shortest-Job-First (S.J.F.)
Round Robin
Make the analysis of four different processes initiated and the operation of each algorithm of.
Shortest-Job-First (S.J.F.)
Round Robin
Solución
4
Ejercicio 1
1. Con CMD cambie el color de la letra de la consola a azul, para poder diferenciar entre le la
Para consultar la información del hardware dentro del CMD se utiliza el comando
Systeminfo.
puede actualizar. Conocer la versión del BIOS de la computadora puede indicarle si tiene la
Mostrar IP:
Mostrar IP
(Invoke-WebRequest "http://www.jesusninoc.com").BaseResponse
(PowerShell)
6
CMD:
PowerShell:
Mayor simplicidad en los
Los comandos son mas
comandos
estructurados y son procesados
actualizarse
Herramienta mas actualizada
Cuando se trata de codificación en
Crear nuestros propios comandos,
terminal las personas recurre más
esto gracias al lenguaje C#
al terminal CMD
Ejecución remota de tareas
Automatizar tareas mediante
Ejecutar trabajos en segundo plano
secuencias de comandos
Poco intuitiva
Ejercicio 2
The operating system maintains a list of concurrent pages in memory, with the top page in the list
being the oldest and the last page in the list being the last to arrive. In the event
9
of a missing page, the head page is replaced and the new page is added to the end of the list.
Disadvantage: The oldest page can be heavily used by the others. Example:
1. Extract the page of the lowest class by starting to look for the oldest page.
2. second chance: The oldest page is inspected as a potential victim. If its R bit is set to 0, it is
replaced and if it is set to 1 it is set to 0 and the page is put at the end of the list by searching the
next page in the list (if all pages have been referenced we will have pure FIFO). The more pages
the memory has, the less page faults a program has: Belady's anomaly: FIFO causes more page
faults with 4 pages than with 3 (it is a curiosity, it is not an important result).
the process with the smallest amount of time remaining until completion is selected to execute.
Since the currently executing process is the one with the shortest amount of time remaining by
definition, and since that time should only reduce as execution progresses, processes will always
run until they complete or a new process is added that requires a smaller amount of time.
Shortest-Job-First (S.J.F.)
This algorithm helps OS to maintain an efficient manner in which input-output requests can be
managed to execute a process. There are various types of algorithms that an operating system
The SJF (Shortest Job First) scheduling algorithm in which the CPU executes the job first has the
shortest execution time. Also, the burst time is an important factor in SJF scheduling.
Following are the characteristics of (Shortest Job First) SJF scheduling program in C.
This algorithm is helpful for those types of processing of jobs in which the completion time of a
This algorithm can improve the CPU processing as it executes the shorter jobs first which leads to
Round Robin
preemptive in nature that it switches between processes according to the time allotted for each
process. The time slice that is used to switch between the processes is known as Quantum. Round
Robin scheduling is cyclic in nature and is also known as Time Slicing Scheduling.
11
(S.R.T.)
processes.
Ejercicio 3:
Ejemplo A FIFO:
FIFO
Proceso Tf Tll t T W P
A 8 5 8 3 5 0,4
B 18 8 10 10 0 1
C 22 15 4 7 3 1,8
D 27 18 5 9 4 1,8
E 30 20 3 10 7 3,3
Promedio 7,8 3,8 1,66
13
Ejemplo B FIFO:
FIFO
Proceso Tf Tll t T W P
A 4 3 4 1 3 0,3
B 11 6 7 5 2 0,7
C 20 8 9 12 3 1,3
D 24 9 4 15 11 3,8
E 29 11 5 18 13 3,6
Promedio 10,2 6,4 1,94
Shortest-Job-First (S.J.F.
Proceso Tf Tll t T W P
A 2 2 2 0 2 0
B 5 4 3 1 2 0,3
C 10 6 5 4 1 0,8
E 14 8 4 6 2 1,5
D 23 10 9 13 4 1,4
Promedio 4,8 2,2 0,8
14
Shortest-Job-First (S.J.F.
Proceso Tf Tll t T W P
A 7 5 7 2 5 0,3
B 16 8 9 8 1 0,9
C 20 10 4 10 6 2,5
E 26 13 6 13 7 2,2
D 34 15 8 19 11 2,4
Promedio 10,4 6 1,66
Shortest-Job-First (S.J.F.
Proceso Tf Tll t T W P
A 3 0 3 3 0 1
B 7 3 4 4 0 1
C 19 6 7 13 6 1,9
D 13 8 5 5 0 1
E 30 10 11 20 9 1,8
Promedio 9 3 1,34
15
Shortest-Job-First (S.J.F.
Proceso Tf Tll t T W P
A 11 1 8 10 2 1,3
B 7 4 3 3 0 1
C 23 8 6 15 9 2,5
D 17 10 4 7 3 1,8
E 14 12 2 2 0 1
Promedio 7,4 2,8 1,52
Round Robin
Proceso Tf Tll t T W P
A 2 2 2 0 2 0,0
B 7 6 3 1 2 0,3
C 9 10 4 -1 5 -0,3
D 19 14 6 5 1 0,8
E 23 16 8 7 1 0,9
Promedio 2,4 -2,2 0,4
16
Round Robin
Proceso Tf Tll t T W P
A 2 0 2 2 0 1,0
B 14 4 4 10 6 2,5
C 16 6 6 10 4 1,7
D 26 8 8 18 10 2,3
E 27 10 7 17 10 2,4
Promedio 11,4 6 2,0
Bibliografías:
https://support.lenovo.com/au/es/solutions/ht070218
https://es.quora.com/Cu%C3%A1l-es-la-diferencia-entre-CMD-y-Powershell
https://w3.ual.es/~rguirado/so/tema5.pdf
17
https://www.geeksforgeeks.org/shortest-remaining-time-first-preemptive-sjf-
scheduling-algorithm/
https://www.scaler.com/topics/sjf-scheduling-in-c/
https://www.scaler.com/topics/round-robin-scheduling-program-in-c/