- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- nanosleep granularity
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-12-2001 07:41 AM
09-12-2001 07:41 AM
nanosleep granularity
some collegues of mine are having troubles in getting a granularity finer than 10 ms when using the system call nanosleep, they need to be able to make a process (eventually a thread) wait for a very precise amount of time.
Is there some system parameter to change for allowing intervals smaller than 10 ms? (without affecting the other system components ;-)
Many thanks in advance
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-12-2001 10:46 AM
09-12-2001 10:46 AM
Re: nanosleep granularity
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-12-2001 11:03 AM
09-12-2001 11:03 AM
Re: nanosleep granularity
suspend the thread for a precise amount of time. A process (thread) with higher priority,
signals, and other scheduling activities could clobber any attempt at precise delays. You would have better luck running at real-time priority but that is only done under very special circumstances. Remember, this is UNIX; it's really not a good fit for applications relying upon very precise timing and scheduling. Your programmers really need to rethink the problem and come up with a better synchronization scheme.
Regards, Clay
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-12-2001 11:12 AM
09-12-2001 11:12 AM
Re: nanosleep granularity
i suppose that some sort of loop with gettimeofday() and sched_yield() could allow a thread to perform other actions with greater timing precision, but the overhead would be (likely) considerable
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-13-2001 06:06 AM
09-13-2001 06:06 AM
Re: nanosleep granularity
The restriction of 10ms comes from the internal clock resolution seen by the kernel. See the constant CLK_TCK = 100 (ticks per second) in /usr/include/sys/time.h.
Klaus