A general purpose operating system has to manage the underlying hardware resources (CPU, memory, disk etc) to provide a satisfactory performance for a mix of interactive, batch and, possibly, real time jobs. The system may be acting as a server providing specialized services to other computers. For many users perceived speed of computing is governed by server performance.
Modern high performance servers (eg. Squid) use a single process to perform different independent activities. However an activity may constitute more than one process. This may be for fault isolation and modularity. An example of this is CGI processing in http servers. In these cases, the user may wish to control the scheduling and resource allocation for a group of processes together.
In current general purpose operating systems, scheduling and resource management do not extend to significant parts of the kernel[1]. An application has no control over the consumption of many resources that the kernel consumes on the behalf of the application. Whatever control it has is tied to assumption that each process is an independent activity.
In summary, in current general purpose operating systems, processes have the dual role of acting as a protection domain and as a resource principal. Hence, the notion of resource principal has to be separated from protection domain for better resource management. Resource containers[1], proposed by Banga, Druschel and Mogul, allow for fine-grained resource management by removing the role of resource principal from processes. Their work primarily concentrates on accounting correctly the overhead of network processing inside the kernel to the right resource container.
A resource container encompasses all system resources that a process or group of processes uses to perform an independent activity. All user and kernel processing for that activity is charged to the resource container and scheduled at the priority of the container.
In this paper, we study the management of system resources for Linux using resource containers. Though our design has many aspects similar to [1], our emphasis has been on the use of resource containers for scheduling soft real-time tasks3 like multimedia. We extend the model of resource containers to support multiple scheduling classes. We also provide a framework in Linux for allowing different scheduling functions for different sets of applications. We also extend the APIs provided in the original model on resource containers. We also provide a /proc interface to resource containers so that its parameters are easily accessible.
We have implemented RCLinux, a resource container implementation for Linux version 2.2.5-15 (Red Hat 6.0). The patch and detailed documentation is available at https://casl.csa.iisc.ernet.in/~mansoor/proj.