Question

In: Computer Science

As described in Section 4.5.2, Linux does not distinguish between processes and threads. Instead, Linux treats...

As described in Section 4.5.2, Linux does not distinguish between processes and threads. Instead, Linux treats both in the same way, allowing a task to be more akin to a process or a thread depending on the set of flags passed to the clone() system call. However, many operating systems — such as Windows XP and Solaris — treat processes and threads differently. Typically, such systems use a notation wherein the data structure for a process contains pointers to the separate threads belonging to the process.

Contrast these two approaches for modeling processes and threads within the kernel. Consider a multiprocessor system and a multithreaded program written using the many-to-many threading model. Let the number of user-level threads in the program be more than the number of processors in the system. Discuss the performance implications of the following scenarios.

Solutions

Expert Solution

On one hand, in systems whereprocesses and threads are considered as similar entities, some of the operating system codecould be simplified. A scheduler, for instance, can consider the different processes and threadsin equal footing without requiring special code to examine the threads associated with aprocess during every scheduling step. On the other hand, this uniformity could make it harderto impose process-wide resource constraints in a direct manner. Instead, some extra complexity is required to identify which threads correspond to which process and perform therelevant accounting tasks.

And if we are considering a multiprocessor system and a multithreaded program written using the many-to-many threading model. Let the number of user-level threads in the program be more than the number of processors in the system. Discuss the performance implications of the following scenarios:

a. The number of kernel threads allocated to the program is less than the number of processors. The scheduler can only schedule user level processes to the kernel threads, and since some of the processes are not mapped to the kernel threads, they will be idle.

b. The number of kernel threads allocated to the program is greater than the number of processors but less than the number of user-level threads. All of the processes will be working simultaneously assuming there are enough user threads. If a kernel thread is blocked, it may be swapped out for one that isn’t blocked.


Related Solutions

Distinguish between homogeneous and heterogeneous reactions. Which ones are described by boundary conditions and which ones...
Distinguish between homogeneous and heterogeneous reactions. Which ones are described by boundary conditions and which ones manifest themselves in the differential equations
Distinguish between top-down and bottom-up processes In perception. Making explicit reference to several of the pain...
Distinguish between top-down and bottom-up processes In perception. Making explicit reference to several of the pain management techniques.
1. Does light behave as a wave instead of a particle? 2. what's the difference between...
1. Does light behave as a wave instead of a particle? 2. what's the difference between the wavelength of red and green lasers 3. Why is white light different from the wavelength of the red and green lasers?
It is common to distinguish between whether an asset acquisition is “capitalized” versus “expensed”. What does...
It is common to distinguish between whether an asset acquisition is “capitalized” versus “expensed”. What does this mean, i.e. what does “capitalized” mean and what does “expensed” mean? From a value perspective, given that value is fundamentally the present value of future cash flows, given the choice, which alternative would be preferred? When an asset is capitalized, this is generally an application of which of the 4 basic principles underlying GAAP? Explain.
Distinguish between the nominal rate and the real rate of interest. How does inflation affect the...
Distinguish between the nominal rate and the real rate of interest. How does inflation affect the real, ex post (after the fact) rate of return to investors?
Why does the UCC distinguish between merchants and nonmerchants by holding merchants to a higher standard...
Why does the UCC distinguish between merchants and nonmerchants by holding merchants to a higher standard in some instances? What does it mean to require parties to act in "good faith" in the performance of a sales contract? Explain and provide an example.
in 200 words or more How does one distinguish between the different types of ratios and...
in 200 words or more How does one distinguish between the different types of ratios and their purposes? Give an example
6. The Altham statistic does not distinguish between occupations with more and less workers. If some...
6. The Altham statistic does not distinguish between occupations with more and less workers. If some occupations are growing and other occupations are shrinking, then why might it be problematic to use the Altham statistic to compare occupational mobility at different points in time?
Distinguish between positive and negative externalities. Give an example of each. How does the government get...
Distinguish between positive and negative externalities. Give an example of each. How does the government get involved in each? OR Compare and contrast private and public goods. Explain how the characteristics of a public good lend itself to having free-riders. Give an example. OR Describe in detail why the marginal benefit of cleaning up pollution is decreasing and the marginal cost of cleaning up pollution is increasing. Next, explain how the optimal level of pollution is found using the information.  ...
Distinguish between the real-balances effect and the wealth effect. How does each relate to the aggregate...
Distinguish between the real-balances effect and the wealth effect. How does each relate to the aggregate demand curve? What assumptions makes the immediate short-run supply curve horizontal? Why is the long-run supply curve vertical? Explain how an upward sloping aggregate supply curve weakens the realized multiplier effect from an initial change in investment spending. Why does a reduction in aggregate demand in the real economy reduce output rather than prices? In early 2001 investment spending sharply declined in the United...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT