Re: Idle priority
Re: Idle priority
- Subject: Re: Idle priority
- From: Mike Mimic <email@hidden>
- Date: Thu, 30 Jul 2009 00:19:53 -0700 (PDT)
Hi!
We have a Mac based grid in our laboratory and we are trying to utilize spare cycles for some non-critical projects our students are doing. We would like that our computations are in no way slowed (they are CPU bounded and not memory or probably even not cache bounded, but yes, having a process "up" would probably eat some of memory and cache but we are not concerned with this, but we are concerned with eating CPU) because of that. So we would like that our students can ran their processes with "idle" priority which would jump in whenever there we are not fully using the systems (as they are 8-core systems there is almost all the time some spare cycles). And we would like that this is managed by process scheduler (and not some external program which would enable/disable students' processes if there is load or not - we will probably go for this solution if it is shown that it is not possible to delegate this job to scheduler, but we would like first to
try through scheduler) as this would give students the most cycles (we still like to make also their computations finish as soon as it is possible). As this are non-interactive computation-only programs (ours and of our students') they is no real problem of suspending them completely for some time (like if there are no spare cycles) and also they all compete for same resources (CPUs).
There is a rtprio call on FreeBSD (and I believe Linux):
http://www.gsp.com/cgi-bin/man.cgi?section=1&topic=rtprio
Which has a level for exactly this:
A process with an idle priority will run only when no other process is runnable and then only if its idle priority is equal or greater than all other runnable idle priority processes.
> That's what the minimum regular priority is
> for. The system reserves the right to decide that
> something else is even less important.
> You're making the usual mistake of thinking
> that your process is somehow special, although in this case
> that it's somehow less important than other unimportant
> things.
I cannot agree with you. Yes, among non-important processes it is OK that system decides how it will run them. But there should be a way to say this "non-important" process, in comparison with other "normal" processes should be never run unless "normal" processes are all in a blocked state (or there are none).
And if I mark those "spare cycles" processes as special, they are special - special in a comparison to other processes I have not marked as such and I would like that OS behaves accordingly.
It is similar to real-time contracts you do with an OS - if you keep your side of a margin the OS has to keep its. And you mark those real-time processes as special. And this is the same case, just on the opposite side of the spectrum.
So there ought to be a way to say this to the scheduler (as there is a way to say that a processes should be scheduled in a real-time manner). As there is on FreeBSD (and Linux) with a rtprio tool (rt = real-time, they know this is the same thing).
Mike
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-kernel mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden