Advertisement
jonnern7

Untitled

Mar 23rd, 2017
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.44 KB | None | 0 0
  1.     public Event addIoRequest(Process requestingProcess, long clock) {
  2.         // TODO: addIoRequest, correct?
  3.         ioQueue.add(requestingProcess);
  4.  
  5.         /* Process left CPU */
  6.         requestingProcess.leftCpu(clock);
  7.  
  8.         /* Initiate I/O operation if device is free */
  9.         if(activeProcess == null){
  10.             return startIoOperation(clock+requestingProcess.getTimeToNextIoOperation());
  11.         }
  12.  
  13.         return null;
  14.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement