![]()
The goal is to promote a process to a higher-priority queue if it spends a certain amount of time waiting in its current queue for service. Finally, your MLFQ scheduler should support aging.Note that you don't need to preempt threads in the middle of a timer interrupt (e.g., if a new thread arrives), since timer interrupts are the basic measurement unit of timeslices. Design your system such that the time slice for RQ1 is twice as long as the time slice for RQ0, and the time slice for RQ2 is twice as long as the time slice for RQ1. The time slice for RQ0 should last for two timer interrupts (each timer interrupt is separated by roughly 500 ticks).Within each priority queue, preemptive round-robin scheduling is used. RQ0 is the highest priority queue RQ1 is the next highest RQ2 is the lowest priority queue. Scheduling is done on a preemptive basis. ![]() A process that is blocked before it consumes its entire time slice is promoted, i.e., it is moved to the next-highest priority queue. T is demoted to RQ2 if once again it executes for the duration of the next time slice assigned to it. When T is eventually placed in the Running State, if it executes until the end of its assigned time slice, it is placed in RQ1 (back in the Ready State). When a thread T first enters the system, it is put in RQ0.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |