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
A hard-disk drive reads “120 GB HDD 7200 rpm 3 GB/sec transfer rate”. If the drive has a sector size of 512 bytes, what is the average rotational latency and transfer time to read

Semispace works by maintaining two disjoint areas from which memory can be allocated. These areas are called the from-space and the to-space. At ?rst, the algorithm allocates memor

Q. Describes responsibilities of the I/O manager? Answer: The I/O manager is responsible for file systems and device drivers and network drivers. The I/O manager keeps follow

What is low-level formatting? Before a disk can kept data, it must be required into sectors that the disk controller can read and write. This procedure is called low-level form

What are the necessary conditions for deadlocks? 1. Mutual exclusion :  Only one process at a time is able to use the resource. 2. Hold and wait :  A process should be holdi

why we say " OS is a resource allocator" and “OS is a control program"?

Organizational, Structural, Logical and Execution Relationships Between Important System Components in Linux Kernel Subsystems A. Description of the Project You are require

Two Level Directory This kind of structure overcomes the problems of assigning unique names to the files. Thus there need not be any confusion among users. In this kind of s


Q. A Burroughs B7000/B6000 MCP file is able to be tagged as sensitive data. When such a file is removed its storage area is overwritten by some random bits. For what reason would