Thread pools, Operating System

Another solution then would be to keep a pool of threads. Whenever a new task arrives, the system would simply get a thread from pool and set that thread to work on the given task. Whenever the pool is empty, the system blocks until another thread completes its task. One natural question now is: how many threads do we "pre-create" and add to the pool? Ideally, we would want to create an in?nite (or large enough) amount of threads; however, this is clearly not possible, since each thread has a descriptor, a stack, etc, but our main memory is ?nite. Also, beyond a certain point, creatingmore threads does not help anymore, and the server starts to slow down again due to things like paging or lock contention. For example, if we only have 4 CPUs, it doesn't help to try to run a billion things at the same time. In practice, the ?ne-tuning of how many thread to add to the pool for any given application is set empirically, or perhaps adaptively.

Posted Date: 3/13/2013 3:04:22 AM | Location : United States







Related Discussions:- Thread pools, Assignment Help, Ask Question on Thread pools, Get Answer, Expert's Help, Thread pools Discussions

Write discussion on Thread pools
Your posts are moderated
Related Questions
Gopher Gallery consists of a shopping mall and a cart ride that covers the 150 acre habitat. There are m visitors and n single-person vehicles. Visitors stroll around the mall at t

Clocks in distributed systems : a. Why are clocks difficult to synchronize in distributed systems? b. What features in a system assume that the clocks are (reasonably) synchr

Explain root partition The root partition,which have the operating-system kernel and potentially other system files, is mounted at boot time. In successful mount operation, ope

Ask quesIn JavaScript, what is event handling tion #Minimum 100 words accepted#

Define secondary memory. This memory holds those pages that are not there in main memory. The secondary memory is usually a high speed disk. It is called as the swap device, an

Q. Give an instance of an application in which data in a file should be accessed in the following order: a. Sequentially b. Randomly Answer: a. Print the content of


Operating Systems 1. Explain Micro-kernel? Specify the benefits of Micro-kernel? 2. Describe seven state process models used for OS with necessary diagram. Differentiate bet

Define a linker programĀ  A linker program links the program along with other programs required for its execution.

What does Verification represent? Verification shows the set of activities that are carried out to confirm that the software correctly executes the specific functionality.