Predictable
Stephen Hahn's blog at Sun Microsystems
All | Pastime | Person | Peruse | Position | Process | Product

« Previous day (Jun 29, 2004) | Main | Next day (Jul 1, 2004) »
20040630 Wednesday June 30, 2004

Resource controls and agent-influenced design

Eric mentioned the agent LWP technique a few days ago. I thought I would point out that the resource controls facility was expressly designed with the agent's capabilities in mind. This choice lets us have an interface like:

int setrctl(const char *controlname, rctlblk_t *old_blk, rctlblk_t *new_blk, uint_t flags);

where the action of setting a resource control value applies to the current process or a process collective that encloses it (like a task, project, or zone). (As opposed to an interface that requires an (idtype_t, id_t) pair to specify its target.) Making this choice means we don't end up having a lot of difficult locking scenarios, as we just insert an agent LWP into a victim process to modify the settings on its task.

Resource controls, when they were introduced in S9, brought in some new useful controls, like task.max-lwps and project.cpu-shares, as well as handling both ulimit(2) and setrlimit(2) calls in a compatible fashion. But S10 has seen the introduction of a number of very useful controls: for instance, the System V IPC tunables have been replaced by a set of resource controls, so that you can dynamically change these settings (and apply different constraints to different projects) without a reboot. Dave Powell deserves the credit for this much appreciated piece of work. New controls associated with cryptographic capabilities, zones, and general resource handling have also appeared. And Steve Lawrence spent a fair bit of time looking at making prctl(1) output actually human-readable.

So it's all much improved from the initial work.

(2004-06-30 10:33:01.0) Permalink
Stephen Hahn
Sun Microsystems
sch@sun.com
17 Network Circle
MS MPK17-301
Menlo Park CA 94025 USA