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

Define busy waiting and spinlock, Define busy waiting and spinlock. Whe...

Define busy waiting and spinlock. When a process is in its significant section, any other process that tries to enter its critical section must loop continuously in the entry c

Create a gantt chart for scheduling algorithms, Question: (a) The follo...

Question: (a) The following table (table 1.0) gives the length of the CPU burst time in milliseconds of processes P 1 to P 4 . Assume the processes arrived in the order P 1 ,

How relocation bits used by relocating loader are specified, Relocation bit...

Relocation bits employed by relocating loader are specified by Relocation bits employed by relocating loader are specified by Assembler or Translator

Write xeyes on command line, Ask question #Minimum 100 words accepteWrite a...

Ask question #Minimum 100 words accepteWrite an xeyes command to display a window that is: ? SIZE: ¦ 400 pixels wide ¦ 300 pixels tall ? LOCATION: ¦ 100 pixels from the right edge

Explain what is file structure, Problem 1. List out the conditions that...

Problem 1. List out the conditions that result in Deadlock situations. Illustrate deadlock situation with a simple graphical notation Listing conditions for deadlock occu

Linux, Discuss the risks of having a single root user

Discuss the risks of having a single root user

Assignment, i need the job to be done within 3 days

i need the job to be done within 3 days

Explain indexed allocation, Indexed allocation Indexed allocation bring...

Indexed allocation Indexed allocation bringing all the pointers together into one location: the index block. Every file has its own index block, which is an array of disk-block

Prolog application, 1. Problem Domain You will be considering the Wumpus ...

1. Problem Domain You will be considering the Wumpus world introduced in Russell and Norvig (2009) Chapter 7. For this programming assignment you'll use Prolog's ability to do in

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