Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

(using C++) Consider the following situation in a computer science laboratory. On any average day about 10 students are working in the lab at any

image text in transcribed

image text in transcribed

(using C++) Consider the following situation in a computer science laboratory. On any average day about 10 students are working in the lab at any given hour. These students uses the shared printer in the lab to print their assignments and reading materials. The time taken for printing tasks varies from one another depending on the pages volumes printed by students. Students can send printing instructions from any terminals attached to same network of the printer. Hence, many students can do so atonce. Below is the six printing job (each labelled as Task ID) that await to be printed along with their printing time and arrival time. Note that time unit starts with to. T1 Table 1 Task ID Execution Time 3 unit time T2 5 unit time T3 2 unit time T4 4 unit time T5 6 unit time T6 1 unit time Arrival Time to ti t3 t6 t10 t14 The timeline of printing job arrival time for Table 1 is illustrated in Figure 1 (up until the last job arrived). to t1 t2 T1| T2 t3 t4 T3 Arrival Time t5 t6 ty te to T4 7 to to t10 t11t12 113 114 T5 T6 Figure 1 Explain how can the printer handles the many instructions. Show your solution in terms of flowchart and full program. Make sure your program use dynamic queue as the data structure and simulates the whole executions till completion. Your program should prints the time when the print job from each student started and their waiting time. It also need to calculate the time needed to complete all printing jobs and the average waiting time. Submission instructions: you need to use dynamic queue for the assignment. You need to have problem analysis section which will include the flowchart. Try flowchart first. Solve the above exercise and upload all your source codes files. Requirements: 1. Flowchart 2. Problem analysis section 3. Source code

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

Step: 3

blur-text-image

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

More Books

Students also viewed these Databases questions

Question

What were the reasons for your conversion or resistance?

Answered: 1 week ago