LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 03-06-2007, 06:48 AM   #1
george_7117
LQ Newbie
 
Registered: Mar 2007
Posts: 3

Rep: Reputation: 0
Set Maximum allowed per-process timer


Hello!

I am using timer_create() function to create a per-process timer. I was able to create 256 per process timers. However, I wanted to created at least 10,000 per-process timers. In this regard, is there a way to set the limitation for the allowed timers that the process can create?

Sort of like setting the maximum of message queue (msgmni) by setting it in sysctl.conf as kernel.msgmni = xxxx.

Thanks a lot!


P.S. I use another PC to run my code, and I really do not know the reason why, but I was able to create 7654 per-process timers using timer_create function. Is the timer creation have any relation to the memory of the PC? or any hardware components?

Anyway, I do hope you could give some points with regards to setting the allowable per-process timer. Thanks again!
 
Old 03-06-2007, 09:12 AM   #2
jim mcnamara
Member
 
Registered: May 2002
Posts: 964

Rep: Reputation: 36
Basically, each timer ties up resources for asynchronous notification - realtime signals. I believe it is a kernel parameter that determines to number of the timers that can be created. This number is a system-wide value, not per process. I'm not positive.

This is the important part, not the system parm:

What you are doing seems to be really bad application design. Your code will spend all of the cpu time allocated to it processing interrupts, spend very little time doing anything else. With your design, it is likely to have a lot of expiry signals sent that never get processed. What are you trying to do? There must be a more system-friendly approach.
 
Old 03-06-2007, 07:25 PM   #3
george_7117
LQ Newbie
 
Registered: Mar 2007
Posts: 3

Original Poster
Rep: Reputation: 0
Set Maximum allowed per-process timer

you are right. however, we have thought about a lot of scenarios, and using the OS timer functions/signal interrupts are much less burdensome to the CPU than using or creating a sort of timeout watch thread.

anyway, do you have any idea how to change the kernel parameters to be able to set the maximum allowed timers? or do i need to install a patch or a high resolution timer package?

thanks again.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
maximum allowed threads on Linux gangaraju Fedora 1 05-26-2006 10:57 PM
How to set screen resolution in KDE past allowed ones? Lechium Linux - Newbie 1 06-16-2004 07:22 AM
Maximum Memory PER PROCESS anewsome Linux - General 1 03-08-2004 02:29 PM
set time limit on allowed user in iptables? luap Linux - Networking 5 03-04-2003 10:55 PM
process wide limit on Maximum file desriptors edreddy Linux - General 5 08-31-2002 12:35 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 11:40 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration