944,126 Members | Top Members by Rank

Ad:
Jun 14th, 2006
0

Sleep Command in UNIX Shell Scripting

Expand Post »
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
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
vanii is offline Offline
1 posts
since Jun 2006
Jun 14th, 2006
0

Re: Sleep Command in UNIX Shell Scripting

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.
Reputation Points: 62
Solved Threads: 10
Junior Poster
jim mcnamara is offline Offline
179 posts
since May 2004

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Shell Scripting Forum Timeline: Help with getopt/getopts
Next Thread in Shell Scripting Forum Timeline: Writing to a FAT12 boot sector





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC