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 at once. 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. Table 1 Task ID Execution Time Arrival Time T1 3 unit time to t1 T2 5 unit time T3 2 unit time t3 T4 4 unit time to T5 6 unit time t10 t14 T6 1 unit time The timeline of printing job arrival time for Table 1 is illustrated in Figure 1 (up until the last job arrived). Arrival Time to t, T1 T2 t2 t3 t4 ts to t7 t8 t9 t10 t11 t12 t13 | t14 T3 T4 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 strcuture 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.

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

answer a,b,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 at once.
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.
Table 1
Task ID
Execution Time
Arrival Time
T1
3 unit time
to
t1
T2
5 unit time
T3
2 unit time
t3
T4
4 unit time
to
T5
6 unit time
t10
t14
T6
1 unit time
The timeline of printing job arrival time for Table 1 is illustrated in Figure 1 (up until the
last job arrived).
Arrival Time
to t,
T1 T2
t2 t3
t4
ts to t7 t8 t9
t10 t11 t12 t13 | t14
T3
T4
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 strcuture 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.
Transcribed Image Text: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 at once. 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. Table 1 Task ID Execution Time Arrival Time T1 3 unit time to t1 T2 5 unit time T3 2 unit time t3 T4 4 unit time to T5 6 unit time t10 t14 T6 1 unit time The timeline of printing job arrival time for Table 1 is illustrated in Figure 1 (up until the last job arrived). Arrival Time to t, T1 T2 t2 t3 t4 ts to t7 t8 t9 t10 t11 t12 t13 | t14 T3 T4 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 strcuture 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.
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 4 steps with 4 images

Blurred answer
Knowledge Booster
Properties of Different Architectures
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education