dpm@cs.cmu.edu (David Maynard) (10/29/88)
There are several flavors of so-called lightweight processes, but these are some general comments that I haven't seen mentioned yet. Most of the comments refer to the way things have been done, not the "ideal" way that you would like them done. 1. Lightweight processes typically share a single address space with their parent ("heavyweight") process. This is one of the features that makes them "lightweight" since you don't have to muck with memory maps and caches when switching between them. 2. Lightweights are often "scheduled" by code that is part of their parent--allowing the parent to schedule them intelligently based on known interaction patterns. The OS scheduler only deals with real processes. Of course, you pay a price for making processes lightweight in this manner. By making them share an address space, you give up a level of fault containment and take on the responsibility of coordinating access to shared resources. This isn't necessarily bad, but you have to keep it in mind. By "hiding" the lightweight processes from the OS scheduler, you lose in other ways. The classic example is page fault handling. Suppose one of the lightweight processes faults. As far as the OS is concerned, the entire process has faulted so that none of the lightweights can proceed until the page is brought in. I believe that people have done various things to get around these problems. --- David P. Maynard (dpm@cs.cmu.edu) Dept. of Electrical and Computer Engineering Carnegie Mellon University Pittsburgh, PA 15213 --- Any opinions expressed are mine only. I haven't asked the ECE department or CMU what they think. ---