Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

i need code for this program in C++. thanks ! Printer queue (Small document first) Write a program to implement Queue Scheduling DOCUMENTS for printer

i need code for this program in C++. thanks !

image text in transcribed

Printer queue (Small document first) Write a program to implement Queue Scheduling DOCUMENTS for printer in which printing would be done on the basis of minimum number pages in a document. Small document first is a scheduling algorithm in which the document with the "minimum number of pages remaining" is selected for printing next Since the currently printing document is the one with the minimum amount of pages remaining by definition, and since that pages should only reduce as printing progresses, document will always run until they complete or a new document is added that has less pages After printing 1 page function check for new documents with fewer pages than it would get selected for printing EXAMPLE Document D1 D2 D3 D4 Total pages Arrival Time 21 6 Insertion and deletion in queue would be D1 D2 D4 D2 D D1 12 32 Printer queue (Small document first) Write a program to implement Queue Scheduling DOCUMENTS for printer in which printing would be done on the basis of minimum number pages in a document. Small document first is a scheduling algorithm in which the document with the "minimum number of pages remaining" is selected for printing next Since the currently printing document is the one with the minimum amount of pages remaining by definition, and since that pages should only reduce as printing progresses, document will always run until they complete or a new document is added that has less pages After printing 1 page function check for new documents with fewer pages than it would get selected for printing EXAMPLE Document D1 D2 D3 D4 Total pages Arrival Time 21 6 Insertion and deletion in queue would be D1 D2 D4 D2 D D1 12 32

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

MFDBS 89 2nd Symposium On Mathematical Fundamentals Of Database Systems Visegrad Hungary June 26 30 1989 Proceedings

Authors: Janos Demetrovics ,Bernhard Thalheim

1989th Edition

3540512519, 978-3540512516

More Books

Students also viewed these Databases questions