System A has two processors. Program X takes 10 seconds to execute on one of the processors. Program Y takes 10 seconds to execute in parallel on the other processor. System B has a single processor that can execute only one program at a time. Program X takes 6 seconds to execute on this processor. Program Y takes 6 seconds to execute on this processor. Which system would you pick if you cared about overall system throughput?
Let is consider that both the processes are submitted at the
same time to system A.
System A would then instantly start programming X on one processor
and Y on another.
Assuming that multi-processing is not allowed on system B.
System B would have to wait 6 seconds for the first process
to finish until it starts second one, so its clear that response
times are quicker on system A
Hence, I would pick system A if I cared about program response time. Throughput is calculate by average time spent by turnaround time.
System A:
Program A (1st -10th second) total = 10 seconds
Program B (1st -10th second) total = 10 seconds
On average it takes 5 seconds (=10/2)
System B:
Program X (1st 6th second) = total of 6 seconds
Program Y(6th =12th second) = total of 12 seconds
On average its takes 6 seconds (=12/2)
So it obvious we should go with system A
Get Answers For Free
Most questions answered within 1 hours.