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

Performance of job scheduling strategies, Performance of Job Scheduling  St...

Performance of Job Scheduling  Strategies In this project you will investigate the performance of Job Scheduling strategies, Memory Allocation strategies and a CPU Scheduling s

Do ratio analysis of financial statements, Do ratio analysis by comparing t...

Do ratio analysis by comparing the four companies financial statements, analysis and interpretation on the four-basic group : (Refer to attachment A) Liquidity ratio Asset

Algorithm for reconstructing a logical ring, Q. Present an algorithm for re...

Q. Present an algorithm for reconstructing a logical ring after a process in the ring fails? Answer: Typically distributed systems utilize a coordinator process that performs

Demand paging, Demand paging With demand paging, a page is called into...

Demand paging With demand paging, a page is called into memory only when a location on that page is actually indexed during run time. With pre-paging, pages other than the one

What are the various categories of software, What are the various categorie...

What are the various categories of software?  System software Application  software Engineering/Scientific software Embedded software  Web Applications Artificial I

Explain swapping, Explain Swapping Swapping is a method of temporarily ...

Explain Swapping Swapping is a method of temporarily removing inactive programs from the memory of computer system.

Differences among user-level threads and kernel-level thread, Q. What are t...

Q. What are two differences among user-level threads and kernel-level threads? Under what situations is one type better than the other? Answer: (1) User-level threads are un

Scheduler that select process from secondary storage device, A scheduler th...

A scheduler that selects processes from secondary storage device is known as                    Medium term scheduler is a scheduler that selects processes from secondary stor

Deadlock-avoidance safety algorithm, Q. Presume that you have coded the de...

Q. Presume that you have coded the deadlock-avoidance safety algorithm as well as now have been asked to implement the deadlock-detection algorithm. Can you do thus by simply usin

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