Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public Event addIoRequest(Process requestingProcess, long clock) {
- // TODO: addIoRequest, correct?
- ioQueue.add(requestingProcess);
- /* Process left CPU */
- requestingProcess.leftCpu(clock);
- /* Initiate I/O operation if device is free */
- if(activeProcess == null){
- return startIoOperation(clock+requestingProcess.getTimeToNextIoOperation());
- }
- return null;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement