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
Some CPUs provide for more than two modes of operation. What are two possible uses of these multiple modes?

Briefly explain about file system implementation? Several on-disk and in-memory structures are used to execute a file system. On disk, the file system may have information abou

Hierarchical paging method Most modern computer systems maintain a large logical-address space. In this situation the page table itself turns into excessively large. To remedy

Define a state which is not a fundamental process state Answer: Blocked state is not a fundamental process state

Can you give me assistance on my operating system assignment?

Define a layer that is not of an IO management module  MCS that is Management Control System is not of an IO management module

Q. Explain application of consumer behaviour? Consumer behaviour is described as the dynamic interaction of affect and cognition and behaviour and the environment by human bein

LRU page replacement In least lately used page replacement algorithm we will replace that page that hasn't been used for the longest period of time. This is similar as an opti

1. How is reliability enhanced with the microkernel approach to system design?  2. In a virtual machine design where guest operating systems are independent virtual machines sup

Q. List three instances of deadlocks that aren't related to a computer system environment. Answer: Two cars passage a single-lane bridge from opposite directions.