QUEUE Introduction
A queue is a special kind of linear list, which is used to hold the items in memory for processing in first in first out order(FIFO)
Queue can be implemented by using array or link list.
There are different types of queue like simple queue, DE-queue and priority queue.
Elements can only be entered to the BACK of the queue.
Only one end is used to access, modify and delete any element in simple queue.
The end at which the elements are inserted is called REAR.
The end at which the elements are deleted is called FRONT.
In Dequeue, the elements can be added or deleted at any location. Values can also be retrieved from both ends.
Priority queue is used to access the memory location on priority basis depending on the value or the index of the location.
The structure of the queue is the same as of the line of people. A person who wishes to stand in line must go to back, which is called rear. The person standing in front will be served first. This end is considered as front.
Same like that, a program requests for the allocation of memory first, will be accommodated first. Any other program, requests for the memory will be considered afterwards.
Same like that a program, which is accommodated first, will be removed first during paging and swapping by the operating system.
Queue Usage & Presentation
The purpose of a queue is to provide some form of buffering to some incoming or outgoing streams. In computer systems, the queue is used for:-
Process Management: in a time sharing system of computer, programs are added to a queue and are executed one after the other.
Buffering: Documents sent to the printer for printing are added to a queue to minimize the gap between the fast computer and a printer, which is slower in performance.
7 Comments
Please also upload data about tree and searching sorting also
ReplyDeleteGood for students at undergraduate level
ReplyDeleteBeginners and advanced levels of students can be benefitted
ReplyDeleteinformative
ReplyDeletegood
ReplyDeletegood
ReplyDeleteSuperb
ReplyDelete