Multiple Queues
We can maintain two queues in the same array which is possible. If one grows from position 1 of the array and the other grows from the last position queue refers to the data structure where the elements are stored such that a new value is inserted at the rear end of the queue and deleted at the front end of the queue.
in order to maintain two queues there should be two Front and two rear of the two queues Both the queues can grow up to any extent from 1st position to maximum. Hence there should be one or more variable to keep track of the total number of values stored. The overflow condition will appear. If count becomes equal to or greater than array size and the underflow, condition from empty queue will appear if count =0
The structure for such an implementation be given as
Structure multiqueue
{
Int Front 0. Front 1;
Int Rear 0. Rear 1;
Int num;
Int count;
};
Initially when both the queues are empty then the initialization of front and queue as;
Front 0 = rear 0= -1
And for other queues
Front 1= rear 1= 4.
So when one element comes in the first queue then front 0 and Rear 0 are initialized to 1 and when element comes in the second queue then Front 1 and Rear 1 are initialized to 5. Then Rear are incremented by one after every insertion & decremented by one after every deletion.
FIFO queue. A queue in which the first item added is always the first one out.
LIFO queue. A queue in which the item most recently added is always the first one out.
Priority queue. A queue in which the items are sorted so that the highest priority item is always the next one to be extracted.
Life critical systems. Systems on which we depend for safety and which may result in death or injury if they fail: medical monitoring industrial plant monitoring and control and aircraft control systems are examples of life critical systems.
eal time systems. Systems in which time is a constraint. A system which must respond to some event (e.g., the change in attitude of an aircraft caused by some atmospheric event like wind shear) within a fixed time to maintain stability or continue correct operation (e.g. the aircraft systems must make necessary adjustments to the control surfaces before the aircraft falls out of the sky!).
Data Structure & Algorithms Assignment Help, Live Experts
Struggling with data structure problems? Data structure subject is quite tough to learn? Need quick assistance in data structure questions? ExpertsMind.com is right place for you where your search ends, We at ExpertsMind offer online data structure assignment help, data structure homework help and data structure and algorithms question's answers by best online support by qualified tutors.
ExpertsMind.com - Multiple Queues Assignment Help, Multiple Queues Homework Help, Multiple Queues Assignment Tutors, Multiple Queues Solutions, Multiple Queues Answers, Queues Assignment Tutors