What is priority queue? Why do you need this type of queue?

Answers

This answer is not selected as best answer. This answer may not be sufficient for exam.

Your limit has been exceed. We have implemented this system because, We got difficulty on managing our servers. Please donate some amount to remove this limit.

Quota: 0 / 30

Donate

A prority queue is a collection of elements such that each element has been assigned a prority and the order in which elements are deleted and processed comes in following rules:

  1. An element of higher priority is processed before any element of lower priority.
  2. If two elements has same priority then they are processed according to the order in which they were added to the queue.

The best aplication of prority queue is observed in CPU scheduling.

There are two types of priority queue:

  1. Ascending Priority Queue
  2. Descending Priority Queue

Importance of Priority Queue:

Priority queues are very important to systems that juggle multiple programs and their execution (programs are chosen to run based on their priority). They are also very important to networking systems, like the internet, because they can help prioritize important data to make sure it gets through faster.

If you found any type of error on the answer then please mention on the comment or submit your new answer.
Leave your Answer:

Click here to submit your answer.

Discussion
0 Comments
  Loading . . .