1847092 Members
5933 Online
110262 Solutions
New Discussion

Re: ksleep command

 
SOLVED
Go to solution
Ramsunder S
Occasional Advisor

ksleep command

Hi,
What is the ksleep command? How is it different from the sleep command?

Regards,
Ram.
2 REPLIES 2
harry d brown jr
Honored Contributor
Solution

Re: ksleep command

The sleep*() Routines
Unless a thread is running with real-time priority, it will exhaust its time slice and be put to sleep. sleep() causes the calling thread (not the
process) to suspend execution for the required time period. A sleeping thread gives up the processor until a wakeup() occurs on the channel on
which the thread is placed. True? During sleep() the thread enters the scheduling queue at priority (pri).
??? When pri <= PZERO, a signal cannot disturb the sleep
??? Ifpri > PZERO the signal request will be processed.
??? In the case of RTPRIO scheduling, a signal can be disturbed only if SSIGABL is set. Setting SSIGABL is dependent on the value of pri.
NOTE The sleep.h header file has parameter and sleep hash queue definitions for use by the sleep routines. The ksleep.h header file has
structure definitions for the channel queues to which the kernel thread is linked when asleep.

http://devresource.hp.com/STK/partner/proc_mgt.pdf


live free or die
harry
Live Free or Die
Ramsunder S
Occasional Advisor

Re: ksleep command

Thanks Harry. The document is quite informative.
As I understand it, ksleep would be invoked by the kernel thread when a sleep is called by its corresponding process thread (assuming that we have the 1x1 model - Kernel Space Threads per the document in HP-UX 11 as well). Is that right?