next up previous
Next: Beautification Facilities Up: Resource Facilities Previous: Processes

Resources

A resource is a commodity needed by a process to do its work. The computer hardware provides a number of fundamental resources. A process needs memory space for its code and data, processor time to execute its instructions, and I/O facilities to accept data and produce results. In addition to these fundamental resources, the operating system introduces new resources. For example, files are provided to store permanent data. Facilities may be provided for interprocess communication. Other higher level resources may be built out of these fundamental resources.

The following analogy may explain the process-resource concept. Consider a theater that shows several one-actor plays simultaneously. The theater corresponds to the computer and the actors to the processes. The resources are the props used by the actors. As actors need props, they request them from the director (operating system). The director's job is to satisfy the following contradictory goals:

The director also is responsible to the owners of the theater (that is, the owners of the computer), who have invested a considerable sum in its resources. This responsibility also has several goals:

As an example of how these conflicting goals are reconciled, consider the allocation of processor time. For fairness, processed are allocated time in a round robin fashion. However, when a new process is created, it is not immediately given the processor, even though it is the most deserving as it has not yet used any time. Instead, it is made to wait until the current process completes its time quantum, as frequent scheduling is ineffecient, leading to lower throughput. Similarly, to increase utilization, if an executing process makes a blocking call, it is unscheduled even if it has not completely used up its time quantum.



next up previous
Next: Beautification Facilities Up: Resource Facilities Previous: Processes



Prasun Dewan
Tue Jan 13 12:23:19 EST 2004