Thread pools, Operating System

Assignment Help:

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.


Related Discussions:- Thread pools

Memory management, 4. Describe priority scheduling algorithm. Consider the ...

4. Describe priority scheduling algorithm. Consider the following set of processes. Show the order in which the algorithm will schedule these processes. Assume preemptive and non-p

Explain how a domain user account is authenticated, Question: a) The fo...

Question: a) The following questions pertain to User and Group accounts in Windows XP: i) Give four differences between a Power User and a Guest User account. ii) Explain h

Design a android application, As mentioned earlier, the game engine will b...

As mentioned earlier, the game engine will be used as the base of developing the Go game for the Android. This includes improving logic of the game, design good graphics and optim

Cpu, Some CPUs provide for more than two modes of operation. What are two p...

Some CPUs provide for more than two modes of operation. What are two possible uses of these multiple modes?

Objectives and functions of an operating system, Question: a) What is ...

Question: a) What is an Input/Output module and what are the five categories their functions fall into? b) What is an Operating System? Briefly describe the two objectives

What are the different thread levels?, What are the different thread levels...

What are the different thread levels? There are two broad type of thread implementation: User-Level Threads -- Thread Libraries. Kernel-level Threads -- System Calls.

Is data in a file access sequentially or randomly, Q. Give an instance of ...

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

Explian integrating a request/response mechanism, Explian Integrating a Req...

Explian Integrating a Request/Response Mechanism Traditional application developers will need to develop a mechanism for communication between requesting (client) and respondin

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd