Question: Question 4 : CPU Scheduling Implementation Round Robin: Expectations: - Average Run Time: Will decrease with more CPUs implemented. This is because multiple processes can

Question 4: CPU Scheduling Implementation
Round Robin:
Expectations:
- Average Run Time: Will decrease with more CPUs implemented. This is because multiple processes can be concurrently executed. This reduces the time each process spends waiting for time in CPU.
- Wait Time: High with 1 CPU, decreases with more implemented. This is because more processes can be handled at the same time.
- Sleep time: With more CPUs, sleep time should increase as I/O-bound processes will get more frequent access to the CPU.
Testing: SCHEDULER=RR (schedtest)
CPUS=1: Average run-time =21, wait time =165, sleep time =20
CPUS=2: Average run-time =18, wait time =56, sleep time =79
CPUS=3: Average run-time =15, wait time =35, sleep time =87
First-Come-First-Served:
Expectations:
- Average Run Time: Will decrease with more CPUs implemented. More processes can be simultaneously scheduled when more CPUs are available.
- Wait Time: High with 1 CPU, decreases with more implemented. With 1 CPU, tends to be lower compared with Round Robin.
- Sleep time: Should remain constant, regardless of how many CPUs are available. This is because processes can run without preemption.
Testing: SCHEDULER=FCFS (schedtest)
CPUS=1: Average run-time =21, wait time =43, sleep time =100
CPUS=2: Average run-time =12, wait time =26, sleep time =100
CPUS=3: Average run-time =10, wait time =20, sleep time =100
Priority:
Expectations:
- Average Run Time: With more CPUs, should increase as the scheduler can execute many high-priority processes simultaneously.
- Wait Time: As more CPUs are implemented, the wait time should decrease. This is because lower-priority processes will have more opportunity to be scheduled.
- Sleep time: May show variation with more CPUs as the system can schedule I/O-bound processes more effectively.
Testing: SCHEDULER=PRIORITY (schedtest2)
CPUS=1: Average run-time =21, wait time =150, sleep time =100
CPUS=2: Average run-time =13, wait time =66, sleep time =58
CPUS=3: Average run-time =10, wait time =39, sleep time =79
(a) Comparing these average timings you have obtained, are they what you would
expect?
(b) Provide justifications for your answer to (a) above.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!