Is scheduler a task ? - VxWorks

This is a discussion on Is scheduler a task ? - VxWorks ; Hi, Can someone please explain how does a scheduler run ? Siddharth...

+ Reply to Thread
Results 1 to 7 of 7

Thread: Is scheduler a task ?

  1. Is scheduler a task ?

    Hi,

    Can someone please explain how does a scheduler run ?


    Siddharth

  2. Re: Is scheduler a task ?

    On Aug 31, 10:26*am, sidd wrote:
    > Hi,
    >
    > Can someone please explain how does a scheduler run ?



    Start here.

    http://www.embedded.com/story/OEG20030306S0037

    HTH
    GV

  3. Re: Is scheduler a task ?

    On Sep 1, 4:00*am, gvarndell wrote:
    > On Aug 31, 10:26*am, sidd wrote:
    >
    > > Hi,

    >
    > > Can someone please explain how does a scheduler run ?

    >
    > Start here.
    >
    > http://www.embedded.com/story/OEG20030306S0037
    >
    > HTH
    > GV


    The link says "The scheduler is a software that consumes processor
    cycles. Context switches and clock ticks can also consume a
    significant percent of the available time, particularly if they occur
    frequently"

    So can I say it is a task ?

  4. Re: Is scheduler a task ?

    sidd wrote:
    > On Sep 1, 4:00 am, gvarndell wrote:
    >> On Aug 31, 10:26 am, sidd wrote:
    >>
    >>> Hi,
    >>> Can someone please explain how does a scheduler run ?

    >> Start here.
    >>
    >> http://www.embedded.com/story/OEG20030306S0037
    >>
    >> HTH
    >> GV

    >
    > The link says "The scheduler is a software that consumes processor
    > cycles. Context switches and clock ticks can also consume a
    > significant percent of the available time, particularly if they occur
    > frequently"
    >
    > So can I say it is a task ?


    The definition of a scheduler that I like is "that routine which
    schedules tasks", which shows that the scheduler is not usually,
    itself, a task. It *could* be a task scheduled by a higher-level
    scheduler, but when you say "THE scheduler" you imply that there
    is only one, and that's true for all enbedded systems that I know
    about.

    Bill


  5. Re: Is scheduler a task ?

    On Sep 2, 4:22*am, Bill Cox wrote:
    > sidd wrote:
    > > On Sep 1, 4:00 am, gvarndell wrote:
    > >> On Aug 31, 10:26 am, sidd wrote:

    >
    > >>> Hi,
    > >>> Can someone please explain how does a scheduler run ?
    > >> Start here.

    >
    > >>http://www.embedded.com/story/OEG20030306S0037

    >
    > >> HTH
    > >> GV

    >
    > > The link says "The scheduler is a software that consumes processor
    > > cycles. Context switches and clock ticks can also consume a
    > > significant percent of the available time, particularly if they occur
    > > frequently"

    >
    > > So can I say it is a task ?

    >
    > The definition of a scheduler that I like is "that routine which
    > schedules tasks", which shows that the scheduler is not usually,
    > itself, a task. *It *could* be a task scheduled by a higher-level
    > scheduler, but when you say "THE scheduler" you imply that there
    > is only one, and that's true for all enbedded systems that I know
    > about.
    >
    > Bill- Hide quoted text -
    >
    > - Show quoted text -


    While scheduler is as said above 'a routine which schedules tasks', it
    is itself not 'scheduled' by some
    higher level scheduler, but relies on clock interrupts to run and
    schedule other user registered tasks.

    -Sujay

  6. Re: Is scheduler a task ?

    On Sep 2, 12:33*pm, sujay wrote:
    > On Sep 2, 4:22*am, Bill Cox wrote:
    >
    >
    >
    >
    >
    > > sidd wrote:
    > > > On Sep 1, 4:00 am, gvarndell wrote:
    > > >> On Aug 31, 10:26 am, sidd wrote:

    >
    > > >>> Hi,
    > > >>> Can someone please explain how does a scheduler run ?
    > > >> Start here.

    >
    > > >>http://www.embedded.com/story/OEG20030306S0037

    >
    > > >> HTH
    > > >> GV

    >
    > > > The link says "The scheduler is a software that consumes processor
    > > > cycles. Context switches and clock ticks can also consume a
    > > > significant percent of the available time, particularly if they occur
    > > > frequently"

    >
    > > > So can I say it is a task ?

    >
    > > The definition of a scheduler that I like is "that routine which
    > > schedules tasks", which shows that the scheduler is not usually,
    > > itself, a task. *It *could* be a task scheduled by a higher-level
    > > scheduler, but when you say "THE scheduler" you imply that there
    > > is only one, and that's true for all enbedded systems that I know
    > > about.

    >
    > > Bill- Hide quoted text -

    >
    > > - Show quoted text -

    >
    > While scheduler is as said above 'a routine which schedules tasks', it
    > is itself not 'scheduled' by some
    > higher level scheduler, but relies on clock interrupts to run and
    > schedule other user registered tasks.
    >
    > -Sujay- Hide quoted text -
    >
    > - Show quoted text -


    Hi Sujay,

    Can you please elaborate a bit on how scheduler runs on clock
    interrupts ? I mean what exactly happens when the task switch needs to
    taka place.

    Thanks,
    Siddharth

  7. Re: Is scheduler a task ?

    sidd wrote:

    >On Sep 2, 12:33 pm, sujay wrote:
    >> On Sep 2, 4:22 am, Bill Cox wrote:
    >>
    >>
    >>
    >>
    >>
    >> > sidd wrote:
    >> > > On Sep 1, 4:00 am, gvarndell wrote:
    >> > >> On Aug 31, 10:26 am, sidd wrote:

    >>
    >> > >>> Hi,
    >> > >>> Can someone please explain how does a scheduler run ?
    >> > >> Start here.

    >>
    >> > >>http://www.embedded.com/story/OEG20030306S0037

    >>
    >> > >> HTH
    >> > >> GV

    >>
    >> > > The link says "The scheduler is a software that consumes processor
    >> > > cycles. Context switches and clock ticks can also consume a
    >> > > significant percent of the available time, particularly if they occur
    >> > > frequently"

    >>
    >> > > So can I say it is a task ?

    >>
    >> > The definition of a scheduler that I like is "that routine which
    >> > schedules tasks", which shows that the scheduler is not usually,
    >> > itself, a task. It *could* be a task scheduled by a higher-level
    >> > scheduler, but when you say "THE scheduler" you imply that there
    >> > is only one, and that's true for all enbedded systems that I know
    >> > about.

    >>
    >> > Bill- Hide quoted text -

    >>
    >> > - Show quoted text -

    >>
    >> While scheduler is as said above 'a routine which schedules tasks', it
    >> is itself not 'scheduled' by some
    >> higher level scheduler, but relies on clock interrupts to run and
    >> schedule other user registered tasks.
    >>
    >> -Sujay- Hide quoted text -
    >>
    >> - Show quoted text -

    >
    >Hi Sujay,
    >
    >Can you please elaborate a bit on how scheduler runs on clock
    >interrupts ? I mean what exactly happens when the task switch needs to
    >taka place.


    Sujay's statement is correct under some circumstances but is not the whole
    story. This often leads to misunderstandings concerning the relationship
    between the scheduler and the clock/timer.

    The only time that the scheduler is directly invoked by clock interrupts
    is when round robin scheduling (AKA "time slicing") is enabled. This
    allows tasks with equal priority to share execution time by being
    preempted at regular intervals.

    Far more common is priority preemptive scheduling which uses changes in
    the status of inter-task communication mechanisms (semaphores, message
    queues, pipes, and network sockets) to invoke the scheduler. For example,
    when a semaphore is given the semGive() function informs the scheduler
    and, if a task is pending on that semaphore and that task has higher
    priority than any other task that is ready, the task pending on the
    semaphore is activated.

    Typically, semaphores are given, message queues are written, etc.,
    during interrupt service routines. This results in tasks being
    "interrupt driven" in that they pend until an associated interrupt
    occurs.

    --
    ================================================== ======================
    Michael Kesti | "And like, one and one don't make
    | two, one and one make one."
    mrkesti at hotmail dot com | - The Who, Bargain

+ Reply to Thread