Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
I am writing a server program. During the initialization stage, it spawns 100 pthreads to handle clients (I am doing this because, I thought pthread_create is a costly fn and increases my response time if I create them dynamically when request come in.) Then as the requests start coming in, I assign a thread to handle each connection. The problem with this apprach is the server is not fast enough, and sometimes the client requests time out.. I read that this may be improved by setting higher priority to your process.
so , my question is, how to make my process high priority so that cpu allocates longer time for all the threads in my process.
Is it reasonable to expect that all the threads in my process will get high priority if I make my process high priority. Are threads of a process scheduled within the time allocated for a process or are they considered part of a global pool of lwp and independently scheduled?
can anyone give me some pointers or tutorial sites that explain these topics.
Last edited by thespartan; 05-09-2010 at 02:34 PM.
Is it reasonable to expect that all the threads in my process will get high priority if I make my process high priority.
In general, no.
Are threads of a process scheduled within the time allocated for a process or are they considered part of a global pool of lwp and independently scheduled?
It depends on the implementation of the Pthread library you are using. It may be implemented as green threads, 1:1 theads or M:N threads. You simply have not provide enough information for anybody to give you a definitive answer.