Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- rule: if a job uses its entire timeslice, it moves down a queue
- suppose timeout = 9
- int t schedule_job(A, 9);
- if(t < 0)
- //done
- get current time and add to total turnaround
- remove job
- else if(t == timeout){
- reduce queue level
- }else{
- move to the back of the current queue
- (can use a pointer or index and just move up one index)
- (probably gonna have to move it back to the beginning)
- }
- response time: time first run - time of arrival
- pointer to whatever queue is the current one
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement