Three processes , and each execute a loop of iterations. In each iteration of the loop, a process performs a single computation that requires CPU milliseconds and then initiates a single I/O operation that lasts for milliseconds. It is assumed that the computer where the processes execute has sufficient number of I/O devices and the OS of the computer assigns different I/O devices to each process. Also, the scheduling overhead of the OS is negligible. The processes have the following characteristics:
The processes , , and are started at times , and milliseconds respectively, in a pure time sharing system (round robin scheduling) that uses a time slice of milliseconds. The time in milliseconds at which process C would complete its first I/O operation is ___________.
View worked solution
Answer: 1000
To find the completion time of the first I/O operation of process , we trace the CPU scheduling using Round Robin with a time quantum of .
The arrival times are: , , and .
The step-by-step execution trace is as follows:
- : executes. Remaining CPU time for . Ready queue at : .
- : executes. Remaining CPU time for . Ready queue at : .
- : executes. Remaining CPU time for . Ready queue at : .
- : executes and completes its first CPU burst of . initiates its I/O at . Ready queue: .
- : executes. Remaining CPU time for . Ready queue at : .
- : executes. Remaining CPU time for . Ready queue at : .
- : executes. Remaining CPU time for . Ready queue at : .
- : executes. Remaining CPU time for . Ready queue at : .
- : executes. Remaining CPU time for . Ready queue at : .
- : executes and completes its first CPU burst of .
At , process initiates its first I/O operation. Since the I/O operation takes and there is no I/O resource contention, the completion time of 's first I/O operation is:
Free practice · Your answers on this page are not saved.
