Question: Please wrote in C A print queue is a list of documents, called jobs, waiting to be printed. Each job is assigned an integer job

Please wrote in C A print queue is a list of documents, called jobs, waiting to be printed. Each job is assigned an integer job number and an estimated print time, in seconds. If a job arrives and the printer is currently printing another job, the job waits in the print queue. This type of waiting line is called a first-in-first-out (FIFO) or first-come-first-serve (FCFS) waiting line model or queue. Write a program that uses a LinkedList object to store a list of print jobs in a FIFO queue. We will assume that each job has a unique job number that is assigned sequentially, and that the print time is randomly distributed between 10 seconds and 1000 seconds. These two data elements should be defined as part of a Job class. The program should prompt the user to either add a job to the queue or to quit. When a user adds a job, the program assigns a job number and randomly generates a print time for the job. When the user quits, the program will display the jobs (i.e., the job id and print time) in the queue, in the order in which they were added. count the time by second that each step paid to finish the process

Please wrote in C A print queue is a list of documents,

The process like the picture below

called jobs, waiting to be printed. Each job is assigned an integer

The event queue is now: when what 15 job2 arrives 25 job1 finishes at CPU 100000 simulation finished TIME to USE? CPU NEW FIFO QUEUE ? TERMINATE TIME to USE? DISK 1 FIFO QUEUE TIME to USE? DISK 2 FIFO QUEUE TIME to USE ? Network FIFO QUEUE When a job arrives (perhaps because a user double-clicked program), the job needs to spend some amount of time executing using the CPU. The job then either performs I/O on one of two disks, or sends a message to the network The event queue is now: when what 15 job2 arrives 25 job1 finishes at CPU 100000 simulation finished TIME to USE? CPU NEW FIFO QUEUE ? TERMINATE TIME to USE? DISK 1 FIFO QUEUE TIME to USE? DISK 2 FIFO QUEUE TIME to USE ? Network FIFO QUEUE When a job arrives (perhaps because a user double-clicked program), the job needs to spend some amount of time executing using the CPU. The job then either performs I/O on one of two disks, or sends a message to the network

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!