Re: Applications "buying" resources



On 30.12.2010 21:33, D Yuniskis wrote:
On 12/30/2010 6:47 AM, Hans-Bernhard Bröker wrote:
On 30.12.2010 09:53, D Yuniskis wrote:

First of all, note that a task can ignore ANY or ALL
of these "tactics"/requests (except, of course, the
last one :> )

That's exactly the problem. If they can, you have to assume they will.
Which renders the entire scheme moot.

By the same token, "voluntary multitasking" (each task
holding the CPU for as long as it wants before relinquishing
control to the next eligible task) "won't work". :>

And guess what: ultimately it doesn't. If that needed proving, experience with less-than-perfectly-behaved Windows 3.x programs has done just that to very convincing level.

This is fine in a closed-end, fixed functionality product. But,
if you open the product up to other applications, you run the
risk of those other applications misbehaving

Exactly. So if you want to guarantee any kind of real-time behaviour, you have no choice but to disallow such misbehaviour right at the source, i.e. foresee killing processes or threads (or at least taking the CPU away from them forcibly).

Once we agree you need to do that anyway, there's little, if anything, to be gained from offering other mechanisms on top of it. They only add complexity for little gain. You'll likely end up spending more effort in the kernel on getting all those niceties handled than it would have taken the application to just do the job at full throttle.
.



Relevant Pages

  • Re: [PATCH] net: Fix sock_wfree() race
    ... opens a window in sock_wfreewhere another cpu ... might free the socket we are working on. ... holding a reference on sk. ...
    (Linux-Kernel)
  • Re: [RFC][PATCH 14/18] sched: Remove rq->lock from the first half of ttwu()
    ... holding it over the p->state fiddling and load-balance pass. ... scheduling class methods without holding the rq->lock, ... ttwu_stat(rq, p, cpu, wake_flags); ... I don't know if the second fix is good -- I haven't thought out how ...
    (Linux-Kernel)
  • Re: Announce: Free Play ROMs for FARFALLA
    ... boards from a pbc? ... I have a set that I'm holding on to, ... but considering selling. ... CPU are worth the most. ...
    (rec.games.pinball)
  • Re: Would you buy a cpu from this guy?
    ... The gallery photo looks like he's holding it with his bare fingers; ... Remind me never to buy a CPU from you then. ... contact with the pins as if you have charged up with static electricity you ...
    (uk.adverts.computer)
  • Re: [PATCH] net: Fix sock_wfree() race
    ... opens a window in sock_wfreewhere another cpu ... might free the socket we are working on. ... while still holding a reference on sk. ...
    (Linux-Kernel)