Method to calculate user space thread size

Sankar P sankar.curiosity at gmail.com
Wed Apr 3 02:07:54 EDT 2013


On Tue, Apr 2, 2013 at 6:25 PM, naveen yadav <yad.naveen at gmail.com> wrote:
> Dear All,
>
> I have very complex user space application contain more then 400 threads. I
> want to limit the stack size in user space, for this I want to know how much
> stack size each thread use in worst case.

Well, this does not answer your question directly and is not related
to the kernel but I want to suggest something.

I have been using the Go programming language from Google for a few
days and it allows you to spawn goroutines, which are similar to
threads. But the underlying implementation does not create an OS
thread for each go routine. As a result, your application can have
thousands of goroutines. This model of threading was implemented so
that thread space is not exhausted. You can consider using Go (or any
other such lightweight threading library) if you need a lot of
threads.

Sorry if it is not useful.

Sankar
http://psankar.blogspot.com



More information about the Kernelnewbies mailing list