In: Computer Science
Linux always picks up the process from the highest priority queue that is not empty.
How does it prevent starvation of processes in the lower priority queues?
(Please help Operating system question, 6 points)
There are two possible ways to prevent starvation of processes in the lower priority queues :-
01) Aging is a technique of gradually increasing the priority of processes that wait in the system
for a long time (lower priority queues).
For example, if priority belongs to the range from 127(low) to 0(high), we could increase the priority of a waiting
process by 1 in each & every15 minutes. It result that even a process with an initial priority of 127 would take no
more than 32 hours for priority 127 process to age to a priority-0 process.
02) Scheduling algorithms giving every process a time-quantum to use the CPU. Time-Quantum varies, usually,
interactive processes are given lower time-quantum as they spend more time doing I/O while time consuming
/computational processes are given bigger time quantum. After a process runs its time quantum, it is put in an
expired queue until there are no active processes in the system. Then, the expired queue becomes the active
queue and vice versa.