answersLogoWhite

0

What do you have to do in a queue?

Updated: 9/20/2023
User Avatar

Wiki User

9y ago

Best Answer

The queue is a linear data structure where operations od insertion and deletion are performed at separate ends also known as front and rear. Queue is a FIFO structure that is first in first out. Whenever a new item is added to queue, rear pointer is used. and the front pointer is used when an item is deleted from the queue.

User Avatar

Wiki User

9y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What do you have to do in a queue?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Basic Math

Distinct features of queue and stack?

A stack is a data structure in which last item inserted is taken out first . That's why they are known as LIFO (last in first out). Inserting an item in stack is termed as push and taking an item out from stack I s termed as pop. Some applications of stack are : Polish notation, reversing string, backtracking , quick sort algorithm etc. The queue is a linear data structure where operations od insertion and deletion are performed at separate ends also known as front and rear. Queue is a FIFO structure that is first in first out. Whenever a new item is added to queue, rear pointer is used. and the front pointer is used when an item is deleted from the queue.


What are the differences between multitasking and multiprogramming?

Task is defined as a system program which consumes very less system resources(memory, CPU time, HD etc..).A task should have periodic activity and event based activity.Assume a printer which takes 10msec to print each line and you have fired a job to the printer.So the CPU should send every line with a 10msec gap. But transmitting a line to the printer is an output operation, which means the CPU has to execute some instrucions in order to transmit a line to the printer.Assume that the CPU takes 2usec to execute this. So this 2us is nothing but a sysem resource. So this is called as task since it is making less usage of system resource and it is periodic(every 10msec it has to execute instructions) and it is also event based(it has to check whether the printer is ON/OFF)Dos: Mutlitasking (can do printing and scanning simultaneously) but not multi programming(it can execute only one c/c++/java etc program in memory)Unix: Multiprograming and hence multi tasking.AnswerMultitasking and Multiprogramming: In multiprogramming, more than one program lies in the memory i.e. in terms of operating system, the schedular selects the jobs to be placed in ready queue from a number of programs. The ready queue is placed in memory and the existence of more than one program in main memory is known as multiprogramming.Example of multiprogramming, we open word, excel, access and other applications together but while we type in word other applications such as excel and access are just present in main memory but they are not performing any task or work. Or we can say that are not being used at the same time.Whereas multitasking means performing multiple tasks in parallel. Usually, CPU processes only one task at a time but the switching of CPU between the processes (also known as Context Switching) is so fast that it looks like CPU(or processor) is executing multiple processes at a time.Example of multitasking, we listen to music and do internet browsing at the same time (they execute parallely).Also a task (or process) is a part of program under execution. In other words, task is an active entity where as program is passive entity.


Related questions

What are types of Queue?

Queue is a data structure which is based on FIFO that is first in first out. Following are the types of queue: Linear queue Circular queue Priority queue Double ended queue ( or deque )


Which queue most efficient queue using array?

circular queue


What is difference between job queue and ready queue?

Ready queue contain all the jobs that are ready to execute.so the job queue and the ready queue are one and the same.


Queue in a sentence?

He added the download to the queue.(Line)I saw a queue in the park(waiting line)


What is linear queue?

What is linear queue


What is the difference between a priority queue and a circular queue?

A circular queue is similar to the normal queue with the difference that queue is circular queue ; that is pointer rear can point to beginning of the queue when it reaches at the end of the queue. A priority queue is a queue in which each element is inserted or deleted on the basis of their priority. A higher priority element is added first before any lower priority element. If in case priority of two element is same then they are added to the queue on FCFS basis (first come first serve).


What is the collective noun for queue?

The noun 'queue' is a collective noun for a 'queue of people'.


What is queue explain the basic element of queue?

The queue is a linear data structure where operations of insertion and deletion are performed at separate ends also known as front and rear. Queue is a FIFO structure that is first in first out. Following are the types of queue: Linear queue Circular queue Priority queue Double ended queue ( or deque )


What English word can have 4 of its 5 letters taken away and still retain its original pronunciation?

Queue or Q (as in waiting in a queue or the letter Q)


What is circular queue operations circular queue?

A circular queue is similar to the normal queue with the difference that queue is circular queue ; that is pointer rear can point to beginning of the queue when it reaches at the end of the queue. Advantage of this type of queue is that empty location let due to deletion of elements using front pointer can again be filled using rear pointer. There are 2 conditions for queue full if queue is implemented using arrays. First condition is Front = 1 and Rear = N Second condition is Front = Rear + 1


What is the plural of queue?

Queues is the plural of queue.


What is the difference between linear and circular queue?

What is the difference between linear and circular queue? In: http://wiki.answers.com/Q/FAQ/2545-37 [Edit categories]The Queue by Default is Linear, it would be termed as Circular if the Last Element of the Queue pointsto the first element of the List