Skip to contentSkip to conversation

O(1) Entitlement Based Scheduler

RFC PATCH Rik van Riel 4 participants 4 messages Feb 27, 2004 – Mar 4, 2004 3 messages not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

#3 lore raw
Quoted 5 lines · Bill Davidsen

I disagree.

It would be nice to have the scheduler identify processes which interface to user information devices, but it must be done in a way which doesn't open gaping security or misuse holes.

You seem to disagree only with what you think you read, not with what the code does. Please read the actual code, since it seems to do what you propose.

Rik

Signature · 3 lines
"Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are,
by definition, not smart enough to debug it." - Brian W. Kernighan
#4 lore raw
Quoted 11 lines · Rik van Riel
Quoted 5 lines · Bill Davidsen

I disagree.

It would be nice to have the scheduler identify processes which interface to user information devices, but it must be done in a way which doesn't open gaping security or misuse holes.

You seem to disagree only with what you think you read, not with what the code does. Please read the actual code, since it seems to do what you propose.

I disagree with the paragraph preceding my comment, which you removed to take what I said out of context. And I still disagree. I "think I read" that just fine, although it may not correctly summarize the implementation of the code.

In any case, as long as the code provides the protection against letting users change priorities to hog resources I don't disagree with that. Experience has shown that people WILL abuse any mechanism which gives them an unfair share of a shared system. For home systems that's less important, obviously.

Signature · 3 lines
bill davidsen <[email protected]>
  CTO, TMR Associates, Inc
Doing interesting things with little computers since 1979.
#5 lore raw
Quoted 21 lines · Bill Davidsen
Quoted 5 lines · Rik van Riel
Quoted 1 line · Bill Davidsen

I disagree.

Quoted 7 lines
Quoted 3 lines

It would be nice to have the scheduler identify processes which interface to user information devices, but it must be done in a way which doesn't open gaping security or misuse holes.

You seem to disagree only with what you think you read, not with what the code does. Please read the actual code, since it seems to do what you propose.

I disagree with the paragraph preceding my comment, which you removed to
take what I said out of context. And I still disagree. I "think I read" that just fine, although it may not correctly summarize the implementation of the code.

Quoted 6 lines

In any case, as long as the code provides the protection against letting users change priorities to hog resources I don't disagree with that. Experience has shown that people WILL abuse any mechanism which gives them an unfair share of a shared system. For home systems that's less important, obviously.

The O(1) Entitlement Based Scheduler places the equivalent restrictions on setting task attributes (i.e. shares and caps) as are placed on using nice and renice. I.e. ordinary users can only change settings on their own processes and only if the change is more restricting than the current setting. In particular, they cannot increase a task's shares only decrease them, they can impose or reduce a cap but not release or increase it and they can change a soft cap to a hard cap but cannot change a hard cap to a soft cap.

Additionally, only root can change the scheduler's tuning parameters.

I hope this alleviates your concerns,
Peter

Signature · 4 lines
Dr Peter Williams, Chief Scientist                [email protected]
Aurema Pty Limited                                Tel:+61 2 9698 2322
PO Box 305, Strawberry Hills NSW 2012, Australia  Fax:+61 2 9699 9174
79 Myrtle Street, Chippendale NSW 2008, Australia http://www.aurema.com
#6 lore raw
Quoted 6 lines · Peter Williams

The O(1) Entitlement Based Scheduler places the equivalent restrictions on setting task attributes (i.e. shares and caps) as are placed on using nice and renice. I.e. ordinary users can only change settings on their own processes and only if the change is more restricting than the current setting. In particular, they cannot increase a task's shares only decrease them, they can impose or reduce a cap but not release or increase it and they can change a soft cap to a hard cap but cannot change a hard cap to a soft cap.

Additionally, only root can change the scheduler's tuning parameters.

I hope this alleviates your concerns,

I, for one, never had any such concerns. My concern was about the unpriveledged user begin unable to run certain applications under load without prior approval.

Two philosophical points:

1) Perhaps we are trying too hard to please everyone. As Linus said, perfect is the enemy of good. A good scheduler won't work perfectly for everyone's application, but it will work very well for the most important ones. Perhaps people writing schedulers should compete based on overall throughput and latency, rather than on how well it runs xmms (and other such apps).

2) Perhaps certain apps like xmms are 'broken' can be rewritten to behave better with the new scheduler. For instance, more buffering, separating the mp3 decoding thread from the thread that feeds /dev/audio, more efficient decoder, a decoder that voluntarily sleeps when it's 'done enough', so that it doesn't get knocked down to a lower priority, a decoder that 'cheats' on audio quality just to maintain low CPU usage when it finds itself being preempted, etc.

It bears mentioning that many applications work well with 2.4 because they evolved to work well with the 2.4 scheduler. The 2.6 scheduler is different. We shouldn't constrain 2.6 for the sake of old apps. Those old apps should be rewritten to adapt to the new environment. "Working well under 2.6" doesn't require any more adaptation than with 2.4, but it does require _different_ adaptation.

This isn't to speak negatively of Con and Nick and others who have attempted to improve upon the 2.6 scheduler. If they can make old apps work well without impacting the potential that new apps can get out of 2.6, then more power to them!