user401445
user401445

Reputation: 27

How is unfairness measured in operating systems?

In this article, in the section titled Fairness with difficult workloads, they talk about unfairness and quantify it on a scale that goes from 0% (best) to 50% (worst). How is that measured? What do these numbers indicate?

Upvotes: 0

Views: 60

Answers (1)

stark
stark

Reputation: 13189

Unfairness compares actual running time to ideal running time. If you have C cpus, T tasks and S seconds, then ideal running time for each task is

t(ideal) = C * S / T

If you have one CPU and 2 tasks, and one task gets all of the time when it should get half the time, then unfairness is 50%. As it says in the article, 50% is the worst case unfairness.

Upvotes: 0

Related Questions