0

Hi all,
I want to know whether "sleep command in shell scripting is a guarenteed command or not "

In java 'Sleep() ' is not guarenteed to be called when CPU is Idle.

Regards,
VANII

2
Contributors
1
Reply
3
Views
12 Years
Discussion Span
Last Post by jim mcnamara
0

The sleep command in unix is guaranteed to sleep a minimum.
Due to the way quanta (time slices) work in OS schedulers, other processes may get the cpu ahead of the sleeper who just awoke.

ie., there is no guarantee of an upper limit. sleep 1 may last longer than 1 second.

Linux sleep calls nanosleep - read the man page for that.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.