// project 1 pseudo code // note, you don't have to do it this way; this is just a hint. processes = load all bursts from file eventqueue = time based priority queue readyqueue = priority queue (based on some criteria); // e.g. for FCFS, readyqueue is just regular queue, // for SJF, readyqueue is priority on next burst length, etc. for all processes add process to eventqueue at arrival time. currently_running = null; while(eventqueue is not empty){ event = eventqueue.next(); // this gets timewise next event if(event is arrival){ add process to readyqueue. process.waittot = 0; process.waitstart = event.time; }else if (event is end of CPU burst){ currently_running = null; if next burst is IO, add "end of IO" event to eventqueue at event.time + IO burst length; if next burst is CPU, put process into readyqueue. }else if (event is end of IO bust){ put process into readyqueue. process.waitstart = event.time; } if(currently_running == null){ process = readyqueue.next(); // this gets next process to run. process.waittot += event.time - process.waitstart; currently_running = process; add "end of CPU bust" to eventqueue at event.time + cpu burst length. } } For all processes, find average waiting time (average all waittot). Use similar logic to calculate other things (e.g CPU utilization, etc.)