Message from JavaScript discussions

September 2017

— That is aging, something I was just adding

— 

"Highest response ratio next (HRRN) scheduling is a non-preemptive discipline, similar to shortest job next (SJN), in which the priority of each job is dependent on its estimated run time, and also the amount of time it has spent waiting."

— But that could be the ONLY condition

— I never read about scheduling before, haha

— I may have misinterpreted round robin

— I just meant iterating around the list of processes

— And giving them control

— 

Dispatcher.prototype.delegate = function () {

  const timings = [];

  var proc;

  _delegate: for (var loc = 0; proc = this.queue[loc], !this.halt && loc < this.queue.length; loc++) {

    if (proc === null) {

      continue;

    }

    timings[loc] = process.hrtime();

    var sysCall = proc.instance.next(proc.events);

    timings[loc] = process.hrtime(timings[loc])

    timings[loc][1] = proc;

    proc.events.length = 0;

    if (sysCall.done) {

      this.queue[loc] = null;

    }

    if (sysCall.value !== undefined) {

      this.sysCallHandler(sysCall.value);

    }

  }

  return timings;

};

Message permanent page

— 

Dispatcher.prototype.run = function () {
if (!this.halt && this.procs.size > 0) {
this.running = true;
}
_cycle: while (!this.halt && this.procs.size > 0) {
this.scheduler.opt(this.delegate());
}
this.running = false;
};

Message permanent page

— This is how the process delegation cycle takes place

— Why are you naming your loops :P

— I do out of habit haha