Answered step by step
Verified Expert Solution
Question
1 Approved Answer
5. Consider a single processor system in which two processes, A and B, have the following sequential execution patterns: A: [cpu 4 ms; 1/0
5. Consider a single processor system in which two processes, A and B, have the following sequential execution patterns: A: [cpu 4 ms; 1/0 2 ms; cpu 4 ms; I/O 2 ms; cpu 4 ms] B: [cpu 1 ms; I/O 2 ms; cpu 1 ms; 1/0 2 ms; cpu 1 ms] I/O operations for the two processes do not interfere with each other and are blocking. a) If the processes are run consecutively one after another, what is the elapsed time for all to complete? b) Sketch the execution pattern under non-preemptive scheduling and determine the total elapsed time for completion. You may assume that processes are scheduled in the order in which they become ready to run and that in the event of a tie A has priority over B. You may further assume that the scheduler and context switches take negligible time. c) Repeat (5)(b) but for a preemptive scheduler that operates on a time slice of 2 ms, that is, no process can run for more than 2 ms at a time (unless no other process is runnable). d) Is there any evidence from your results for (5)(b) and (5)(c) of a significant advantage for either scheduling method?
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started