Re: Does sleep() system call cause the scheduler to be rerun?

From: Cameron Simpson (cs_at_zip.com.au)
Date: 10/03/03

  • Next message: Keith Morse: "Re: iptables"
    To: redhat-list@redhat.com
    Date: Fri, 3 Oct 2003 15:32:33 +1000
    
    

    On 19:47 02 Oct 2003, Srini Amble <samble@xopworks.com> wrote:
    | Does sleep() system call cause the process to be put on the wait queue?

    Yes.

    | I am hoping sleep() does not cause a spin lock. My objective being to
    | force the process to give up the CPU for some duration of time. I
    | appreciate any helpful response to resolve this question in my mind.

    Sleep is what you want.

    -- 
    Cameron Simpson <cs@zip.com.au> DoD#743
    http://www.cskk.ezoshosting.com/cs/
    A slipping sear could let your M203 grenade launcher fire when you least
    expect it.  That would make you quite unpopular in what's left of your unit.
            - page 9 of the August 1993 issue of PS magazine, the US Army's
              preventive maintenance magazine
    -- 
    redhat-list mailing list
    unsubscribe mailto:redhat-list-request@redhat.com?subject=unsubscribe
    https://www.redhat.com/mailman/listinfo/redhat-list
    

  • Next message: Keith Morse: "Re: iptables"

    Relevant Pages

    • Re: How to wait for multiple threads simultaneously?
      ... A 'condition variable' is the userland-equivalent of a sleep channel ... wait queue to be not worth the effort. ... It simply requires that the lock function not ... because a 'POSIX spin lock' would not ...
      (comp.os.linux.development.apps)
    • Does sleep() system call cause the scheduler to be rerun?
      ... Does sleepsystem call cause the process to be put on the wait queue? ... I am hoping sleep() does not cause a spin lock. ... Srini ...
      (RedHat)
    • Re: Code executing too fast -- causes errors
      ... is also a queue of messages waiting to be processed. ... As you say, sleep suspends execution for a given duration, then resumes ... The key difference between the two approaches is that DoEvents will permit ... Private Sub CommandButton1_Click ...
      (microsoft.public.word.vba.beginners)
    • plz read my paper on wait queues and give me feedback
      ... The desired behavior is to put the process to sleep and wake ... Each entry on the queue describes some process that is sleeping ... Here is how to use the macros: ...
      (comp.os.linux.development.system)
    • Re: MessageBox.Show and program behaviour
      ... Your code is just an infinite loop where you fill your APListView, ... sleep then fill your APListView again, ... messages in its message queue. ... message queue messages and to paint your APListView. ...
      (microsoft.public.dotnet.languages.csharp)