1. Engineering
  2. Computer Science
  3. three cpu bound jobs a through c and one io...

Question: three cpu bound jobs a through c and one io...

Question details

Three CPU bound jobs A through C and one I/O bound job D arrive at a computer center at the times shown in the table below. All times in the table are in ms. Ignore context switches. The system follows the following rules:

a. In the priority column higher numbers indicate higher priorities

b. The I/0 bound job runs for 3ms of CPU time then prints a value, this pair of actions repeat until the job finishes.

c. The print hardware takes 2ms to print one value.

d. The quanta for an I/O bound jobs is cumulative. Therefore:

i. When an I/O bound job leaves the CPU the remaining time in its quanta is recorded

ii. When an I/O bound job reenters the CPU after completing a write the length of the quanta given to it is the remaining time in the quanta recorded before the job left the CPU to enter the print queue

e. When a job leaves the print queue it is placed in the ready queue

i.If the job is starting a new quanta it is placed at the end of the ready queue

ii.If it is continuing an unfinished quanta it is placed at the front of the ready queue

f. When a preempted job leaves the CPU it is placed at the front of the ready queue

g. If two actions take place at the “same” time the order they are completed is

i. place a newly arrived process in the queue

ii. check the queues to see which process is loaded into the CPU next

iii. place a process leaving the CPU into the ready queue or the print queue

iv. place a process leaving the print queue into the ready queue

h. Each process is allowed a quantum of 6 ms of CPU. At the end of the quantum the process will be placed at the end of the appropriate ready queue

i. For CPU bound jobs this quantum will be used in one visit to the CPU.

ii. For I/O bound jobs this quantum may be distributed over several visits to the CPU.


Process Arrival time (ms) Running Time (ms) Priority
A 12 28 4
B 19 34 7
C 2 36 4
D 7 9 7
Determine the turnaround time for each process and the average turnaround time for all processes for each of the following scheduling algorithms. Explain how you arrived at your answers. In particular, your explanation should include a COMPLETE list of steps showing the order in which the processes execute. The duration of each step, and the elapsed time at the end of each step should be shown. The description may be presented as a bulleted list of steps OR a table, with one column per process and an entry for each step.

c) [6 points] first come first served (with non-preemptive priorities).

Solution by an expert tutor
Blurred Solution
This question has been solved
Subscribe to see this solution