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
Normal 0 false false false EN-IN X-NONE X-NONE MicrosoftInternetExplorer4

what is segmentation as it refers to operating system

Networks and operating systems have a lot of overlap. In this course, however,we are not going to discuss networking in detail, but rather focus on the networking abstractions prov

Can you give me assistance on my operating system assignment?

advantages and disadvantages

Write an application that does the following:(1) fill an array with 50 random integers; (2) loop through the array, displaying each value, and count the number of negative values;

What are overlays? To enable a process to be larger than the amount of memory allocated to it, overlays are used. The idea of overlays is to keep in memory only those instructi

Deadlock Detection and Recovery It's a method of permitting the system to enter a deadlock state, detect it and then recover. Deadlock detection : Is the process of