Skip to content

Instantly share code, notes, and snippets.

@oppahero
Created August 3, 2018 04:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save oppahero/8c68588e19dce464dd150fa779fc1d79 to your computer and use it in GitHub Desktop.
Save oppahero/8c68588e19dce464dd150fa779fc1d79 to your computer and use it in GitHub Desktop.
//Cambios de cola
for(int i = 0; i < NUM_QUEUES ; i++){
//Si el tiempo de Quantum de la cola es igual al tiempo en ejecucion por el proceso en cpu
//Y si el T que ha estado ejecutandose es distinto al tiempo de ejecución asignado en un inicio
if ( AdministradorColas.getProcesador().getCola() == (i+1) &&
tiempoEjecucion == queues[i] && AdministradorColas.getProcesador().getTEjecucion() != tiempoEjecucion){
tiempoEjecucion=0;
AdministradorColas.gestionarEvento(); //Pasara a la cola inferior
AdministradorColas.setIdProcesador();
continue;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment