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
What are conditions under which a deadlock situation may arise? A deadlock situation can arise if the following four conditions hold simultaneously in a system: a. Mutual ex

The primary financial objective of corporation is usually taken to be the maximization of shareholder wealth. Discuss:- i. Ways in which the shareholder of a company can encour

Buffering Messages exchanged by communication processes reside in a impermanent queue. Such a queue can be executed in three ways. Zero capacity: The queue length is 0.

how do semaphores help us in eliminating deadlock conditions?


Define the features are needed to implement top down parsing                      Source string marker, Prediction making mechanism and Matching and Backtracking mechanism

What is a file path name? A list of the subdirectories, directories, and files we must traverse to reach a file from the root directory.

Q.  To build a vigorous distributed system you must know what kinds of failures can occur. a. List three possible kinds of failure in a distributed system. b. State which of

Q. How Program execute in operating system? Program execution- The operating system fills the contents (or sections) of a file into memory as well as begins its execution. A us

write a linux command to display lines from 25 - 45 of directory "/edc/password" write a linux command to display directory in /edc