In: Computer Science
1.) You are given 4 processes P1,P2, P3, P4 all ariving at the
same time t=0,
in a dual-processor SMP. (The two CPUs are referred to as CPU-0 and
CPU-1.)
The service time for each process is 40s, 20s, 20s and 10s
respectively
(a) What are the possibilities for the turnaround time of the
job that includes
the execution of all 4 processes? You may assume that each service
time is
just CPU time and no process interferes with the smooth serial
execution of
another process. Assume static scheduling (a process gets a fixed
processor.)
[question-a]
Example. A scenario (possibility) is that all four processes are
assigned
to CPU-0 (or symmetrically to CPU-1). In that case the turnaround
time
for the jobs would be 40+20+20+10 i.e. 90s independently of the
order of
execution of each process. Since we gave you a correct answer it is
not any more part of the question (i.e. set of valid answers) any
more.
2.)
This is a continuation of the previous problem. That's why the question has a (b).
You are given 4 processes P1,P2, P3, P4 all ariving at the same
time t=0,
in a dual-processor SMP. (The two CPUs are referred to as CPU-0 and
CPU-1.)
The service time for each process is 40s, 20s, 20s and 10s
respectively.
(b) What if dynamic scheduling is possible (and a process can start on one processor and then move to another one after preemption)? How small can the turnaround of the job be?