Scheduling Under CPU Contention

This experiment was born from the desire to verify the behavior of various kernel schedulers as CPU resources become exhausted.
  1. Time-sharing processes should be able to meet CPU% needs, provided total CPU requirement is less than 100%.
  2. Real-time processes should always supercede time-sharing processes when enduring >100% loading.
  3. Real-time priority handling should exhibit proper prioritization.

A scenario was created to test these three concerns. Each concern is tested in sequence through periodic-based tasks. In this scenario, each task (T,C) is run with the same period (T) and varying CPU (C) requirements. Some tasks are run with a fixed C value, to test stability, while others are run with steadily increasing C values, to test the scheduler's behavior as it crosses various thresholds.
  1. Contention for CPU among Time-Sharing processes: One process constantly expects to run 30% of the time One process constantly expects to run 40% of the time One process increases load from 20% to 40%. Note that 3 competing processes can only fairly expect 33.3% CPU usage. Since the first only uses 30%, we expect to see it always receive this. The second two can only then split the remaining (70%) CPU time.
  2. Contention for CPU between TS and Real-Time process: One process constantly expects to run 30% of the time One process constantly expects to run 40% of the time RT Process increases from 20% to 50%. As RT Process exceeds 30%, total CPU load will be over 100%. The two TS processes should split the remaining CPU time evenly, up to their CPU usage requirement.
  3. Prioritized RT processes: Any TS tasks running when there is >100% loading from RT tasks should be given 0% CPU usage. CPU time should be given as needed to higher priority tasks before lower priority tasks.

Graphs:

Understanding Data:

Each point recorded shows the amount of time the CPU was dedicated to this process during the interval before the measurement.
Linux 2.4.x
Linux 2.6.x
* Strange Behavior with TS processes
Timesys 4.1
Solaris 10/x86