stacks ppt
stacks ppt
Sec- 45 ,Gurgaon
program:
Rear
Front=0 Rear=0
. . . . . .
6 4
Front
Front =0 Rear=1
. . . . .
6 4 1
9
Front=0 Rear=2
Applications of Queues
• Suppose there is a web-server hosting a web-site to
declare result(s). This server can handle a maximum of 50
concurrent requests to view result(s). So, to serve
thousands of user requests, a Queue would be the most
appropriate data structure to use.
• Some Operating Systems (OS) are required to handle
multiple tasks called - jobs, seeking to use the processor.
Therefore, in a multitasking operating system, jobs are lined
up (queued) and then given access to the processor
according to some order. The simplest way is to give access
to the processor on a FIFO basis.
• When we send print commands from multiple files from the
same computer or from different computers using a shared
printer. The OS puts these print requests in a queue and
sends them to the printer one by one on a FIFO basis.
Write a program to add, remove and display the book details using
list implementation as a Queue