Computer Science, asked by SOURABH3871, 10 months ago

Data structure which is responsible to arrange the jobs send to printer

Answers

Answered by amikkr
0

Queue is responsible for arranging the jobs done by a printer.

  • A queue is a linear data structure.
  • It works on the principle of FIFO i.e., First In First Out criteria.
  • The data that is fed in the very first will be processed and the respective result will be shown.
  • We can understand the working of queue data structure by comparing it with an actual queue is real life. The first person that comes into the queue gets his/her work then and moves out of the queue followed by the next and then the next person.
  • Similar is the case with printers.
  • The data fed to the printer to be printed forms a queue.
  • The data that is fed in the very start will be printed first followed by the next and the next.
  • Hence printer follow the FIFO criteria for execution process.
  • And hence queue data structure is used to arrange the jobs assigned to the printer for execution.

#SPJ2

Answered by syed2020ashaels
0

Answer: Queue

Explanation:

Queue is also an abstract data type or linear data structure, like a stack data structure, in which the first element is inserted from one end called REAR (also called tail) and the removal of an existing element occurs from the other end. called the FRONT (also called the head).

Advantages

• It helps manage data in FIFO (First In First Out) order.

• It can handle items of any data type, making it extremely flexible

Disadvantages

• Adding or removing elements from the center is tricky

Queue application

A queue, as the name suggests, is used whenever we need to manage any group of objects in a first-come, first-served order, while others wait for their turn, as in the following scenarios:

  • 1. Serving requests on a single shared resource such as printer, CPU job scheduling, etc.
  • 2. In a real-life scenario, Call Center phone systems use queues to hold callers in a queue until a service representative is available.
  • 3. Interrupt handling in real-time systems. Interrupts are processed in the same order as they arrive, i.e. first-come, first-served.

#SPJ5

Similar questions