Skip to content

udea-so/actividad-simulacion1

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Actividad de seguimiento - Simulación 1

Integrante correo usuario github
Nombre completo integrante 1 correo integrante 1 gihub user integrante 1
Nombre completo integrante 2 correo integrante 2 gihub user integrante 2

Instrucciones

Antes de empezar a realizar esta actividad haga un fork de este repositorio y sobre este trabaje en la solución de las preguntas planteadas en la actividad de simulación. Las respuestas deben ser respondidas en español o si lo prefiere en ingles en el lugar señalado para ello (La palabra answer muestra donde).

Importante:

  • Como la actividad es en las parejas del laboratorio, solo uno de los integrantes tiene que hacer el fork; y sobre repositorio bifurcado que se genera, la modificación se realiza en equipo.
  • Como la entrega se debe hacer modificando el archivo READNE, se recomienda que consulte mas sobre el lenguaje Markdown. En el repo adjuntan dos cheatsheet (cheat sheet 1, cheatsheet 2) para consulta rapida.
  • Entre mas creativo mejor.

Homework (Simulation)

This program, process-run.py, allows you to see how process states change as programs run and either use the CPU (e.g., perform an add instruction) or do I/O (e.g., send a request to a disk and wait for it to complete). See the README for details.

Questions

  1. Run process-run.py with the following flags: -l 5:100,5:100. What should the CPU utilization be (e.g., the percent of time the CPU is in use?) Why do you know this? Use the -c and -p flags to see if you were right.

    Answer Coloque aqui su respuerta

  2. Now run with these flags: ./process-run.py -l 4:100,1:0. These flags specify one process with 4 instructions (all to use the CPU), and one that simply issues an I/O and waits for it to be done. How long does it take to complete both processes? Use -c and -p to find out if you were right.

    Answer Coloque aqui su respuerta

  3. Switch the order of the processes: -l 1:0,4:100. What happens now? Does switching the order matter? Why? (As always, use -c and -p to see if you were right)

    Answer Coloque aqui su respuerta

  4. We'll now explore some of the other flags. One important flag is -S, which determines how the system reacts when a process issues an I/O. With the flag set to SWITCH ON END, the system will NOT switch to another process while one is doing I/O, instead waiting until the process is completely finished. What happens when you run the following two processes (-l 1:0,4:100 -c -S SWITCH ON END), one doing I/O and the other doing CPU work?

    Answer Coloque aqui su respuerta

  5. Now, run the same processes, but with the switching behavior set to switch to another process whenever one is WAITING for I/O (-l 1:0,4:100 -c -S SWITCH ON IO). What happens now? Use -c and -p to confirm that you are right.

    Answer Coloque aqui su respuerta

  6. One other important behavior is what to do when an I/O completes. With -I IO RUN LATER, when an I/O completes, the process that issued it is not necessarily run right away; rather, whatever was running at the time keeps running. What happens when you run this combination of processes? (./process-run.py -l 3:0,5:100,5:100,5:100 -S SWITCH ON IO -c -p -I IO RUN LATER) Are system resources being effectively utilized?

    Answer Coloque aqui su respuerta

  7. Now run the same processes, but with -I IO RUN IMMEDIATE set, which immediately runs the process that issued the I/O. How does this behavior differ? Why might running a process that just completed an I/O again be a good idea?

    Answer Coloque aqui su respuerta

Criterios de evaluación

  • Despligue de los resultados y analisis claro de los resultados respecto a lo visto en la teoria.
  • Creatividad y orden.

About

Actividad de simulación sobre procesos

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages