I need some Operating System help with an assignment Consider the following pree
ID: 3565989 • Letter: I
Question
I need some Operating System help with an assignment
Consider the following preempitve scheduling algorithm based on dynamically changing priorities. Smaller priority number implies higher priority. When a process is waiting for the CPU, in the ready not running. Its priority changes at a rate a; when it is running. Its priority changes at a rate b. All processes are given a priority of 10 when they are created, enter the ready queue for the first time. The parameters a and b can be set to give many different scheduling algorthims.
what is the algorithm that results from a > b >0?
What is the algorithm that results from a < b< 0
Explanation / Answer
Since processes start at 0, any processes that have been in the system (either running or waiting) have higher priority. Therefore, new processes go to the back of the queue. When a process runs, its priority keeps increasing at the rate of b, which is more of an increase than for the processes in the ready queue. Therefore, every time the process has timer runout, it goes to the front of the ready queue and gets dispatched again. This is the equivalent of FCFS. This time, any new processes entering the system have higher priority than any old ones, since priority starts at zero and then becomes negative when the process waits or runs. New processes go in at the front of the queue. When a process runs or waits, its priority decreases, with the waiting processes decreasing faster than the running process. This is a LIFO (last-in-first-out) algorithm. The question didn't promise that this would be an algorithm you would want to use in real life.