|
|
@@ -25,10 +25,18 @@ void TaskConsola(int pid, vector<int> params) {
|
|
|
int bmax = params[2];
|
|
|
|
|
|
for (int i = 0; i < calls; i++) {
|
|
|
+ uso_CPU(pid, 1);
|
|
|
uso_IO(pid, rand() %(bmax-bmin) + bmin);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+void TaskBatch(int total_cpu, int cant_bloqueos) {
|
|
|
+ while(cant_bloqueos>0){
|
|
|
+ //uso_IO(pid, rand() %(bmax-bmin) + bmin);
|
|
|
+ cant_bloqueos--;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
|
|
|
void tasks_init(void) {
|
|
|
/* Todos los tipos de tareas se deben registrar acá para poder ser usadas.
|