Question

In: Computer Science

Linux always picks up the process from the highest priority queue that is not empty. How...

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)

Solutions

Expert Solution

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.


Related Solutions

Implement a priority queue using a DoublyLinkedList where the node with the highest priority (key) is...
Implement a priority queue using a DoublyLinkedList where the node with the highest priority (key) is the right-most node. The remove (de-queue) operation returns the node with the highest priority (key). If displayForward() displays List (first-->last) : 10 30 40 55 remove() would return the node with key 55. Demonstrate by inserting keys at random, displayForward(), call remove then displayForward() again. You will then attach a modified DoublyLinkedList.java (to contain the new priorityInsert(long key) and priorityRemove() methods). Use the provided...
Implement a priority queue using a DoublyLinkedList where the node with the highest priority (key) is...
Implement a priority queue using a DoublyLinkedList where the node with the highest priority (key) is the right-most node. The remove (de-queue) operation returns the node with the highest priority (key). If displayForward() displays List (first-->last) : 10 30 40 55 remove() would return the node with key 55. You will then attach priorityInsert(long key) and priorityRemove() methods). AND Use the provided PQDoublyLinkedTest.java to test your code. BOTH CODES SHOULD WORK TOGETHER, YOU JUST HAVE TO ADD priorityInsert(int). PLEASE PROVIDE...
Implement a priority queue using a DoublyLinkedList where the node with the highest priority (key) is...
Implement a priority queue using a DoublyLinkedList where the node with the highest priority (key) is the right-most node. The remove (de-queue) operation returns the node with the highest priority (key). If displayForward() displays List (first-->last) : 10 30 40 55 remove() would return the node with key 55. Demonstrate by inserting keys at random, displayForward(), call remove then displayForward() again. You will then attach a modified DoublyLinkedList.java (to contain the new priorityInsert(long key) and priorityRemove() methods), and a driver...
How to write a max-heap implementation of a templated priority queue class using the STL std::vector...
How to write a max-heap implementation of a templated priority queue class using the STL std::vector class to hold the data array
Briefly explain what are the chief differences between queues, dequeues and priority queue? How can you...
Briefly explain what are the chief differences between queues, dequeues and priority queue? How can you determine when it is appropriate to use a queue, a dequeue, or a priority queue? Write a simple example program using any of the 3.
Please explain how to do following in Linux How to list process How to grep process...
Please explain how to do following in Linux How to list process How to grep process how to kill a process how to know pid suppose proccess is down how to check it up and bring it up ?? please write the commands and execute and explain the process
describe how a closed circulatory system delivers oxygen and nutrients and picks up waste and carbon...
describe how a closed circulatory system delivers oxygen and nutrients and picks up waste and carbon dioxide. What types of organisms use a closed circulatory system?
in linux suppose proccess is down . how to check it up and know whether the...
in linux suppose proccess is down . how to check it up and know whether the process is running or not running ? and if process is not running or in down state then how to start that particular process which is not working ?? please tell how to activate or start the particular process is not in working state? please write the commands and execute and explain the process.
Photons of wavelength 65.0 pm are Compton-scattered from a free electron which picks up a kinetic...
Photons of wavelength 65.0 pm are Compton-scattered from a free electron which picks up a kinetic energy of 0.55 keV from the collision. What is the wavelength of the scattered photon?  
For a Linux server: • how to Set up a print server (CUPS), allow clients to...
For a Linux server: • how to Set up a print server (CUPS), allow clients to connect, print to PDF • Create a script that backs up the printed documents every 6 hours please can you help me
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT