Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

How to write a real-time scheduler

jeevespgjeevespg Posts: 1Member
Hello all,

I am planning to write my own real-time scheduler. Basically I have an FPGA and I would like to schedule the tasks that execute on the FPGA. I am planning to start off with a FIFO kind of scheduler and then slowly proceed to priority based scheduler. However I am not sure where to start with. Can anyone suggest me few pointers to start with?

Thanks
Jeeves

Comments

  • johnsonmejohnsonme Posts: 57Member
    Go and get the book "Operating system concepts" by Gange. It's having a red color cover and full of Dinosaurs on it ;)
    That will keep you up..

    Regards,
    Johnson.

    : Hello all,
    :
    : I am planning to write my own real-time scheduler. Basically I have an FPGA and I would like to schedule the tasks that execute on the FPGA. I am planning to start off with a FIFO kind of scheduler and then slowly proceed to priority based scheduler. However I am not sure where to start with. Can anyone suggest me few pointers to start with?
    :
    : Thanks
    : Jeeves
    :
    :

  • tankarraytankarray Posts: 5Member
    : : Hello all,
    : :
    : : I am planning to write my own real-time scheduler. Basically I have an FPGA and I would like to schedule the tasks that execute on the FPGA. I am planning to start off with a FIFO kind of scheduler and then slowly proceed to priority based scheduler. However I am not sure where to start with. Can anyone suggest me few pointers to start with?
    : :
    : : Thanks
    : : Jeeves
    : :
    Hi Jeeves,

    I guess the question is whether or not each of the tasks you want to execute run indefinitely or not. Say if there is an initialization task, you would only want that to run once. Whereas another task you might want to update buffers every so often.

    My suggestion would be to have a master function (the task scheduler) incorporate a function pointer array, calling each function (task or thread, what have you) that way. When the task exits, go to the next array index. Better yet, do the same with a circularly linked list instead of an array so you don't have to rewrite the scheduler every time you add a task.

    Another good suggestion as well as Johnson's as far as reading goes is to perhaps look at the code for microC (uC) real time operating system written by Jean Labrosse. I believe the complete source is available in a CD in the book "An Embedded Software Primer" by David E. Simon.

    tankarray

  • sandyARMsandyARM Posts: 9Member
    : : : Hello all,
    : : :
    : : : I am planning to write my own real-time scheduler. Basically I have an FPGA and I would like to schedule the tasks that execute on the FPGA. I am planning to start off with a FIFO kind of scheduler and then slowly proceed to priority based scheduler. However I am not sure where to start with. Can anyone suggest me few pointers to start with?
    : : :
    : : : Thanks
    : : : Jeeves
    : : :
    : Hi Jeeves,
    :
    : I guess the question is whether or not each of the tasks you want to execute run indefinitely or not. Say if there is an initialization task, you would only want that to run once. Whereas another task you might want to update buffers every so often.
    :
    : My suggestion would be to have a master function (the task scheduler) incorporate a function pointer array, calling each function (task or thread, what have you) that way. When the task exits, go to the next array index. Better yet, do the same with a circularly linked list instead of an array so you don't have to rewrite the scheduler every time you add a task.
    :
    : Another good suggestion as well as Johnson's as far as reading goes is to perhaps look at the code for microC (uC) real time operating system written by Jean Labrosse. I believe the complete source is available in a CD in the book "An Embedded Software Primer" by David E. Simon.
    :
    : tankarray
    :
    :

    I believe its not so simple.
    If I am not wrong you are refereng to a RT scheduler not anapplication level scheduler.
    < what I mean by this : - say I already have an OS up there. now I have Task 1 ... Task n.
    and in side Task 1 or Task x I want to schedule few applications (functions .. ). here I can call the functions in sequence. >
    please clarify what is that you intend to do.
    In case you do not have an OS .. you need to consider a lot of things including the processor you use. there its not just a function call , its a context switch.











  • pravinsrahatepravinsrahate Posts: 4Member
    hi friend,
    i want to develope task scheduler for RTOS in java which will select fixed priority or dynamic priority algorithm depending on nature of the task submitted. plz kindly forward me the basics of the same.
    thanks
  • pravinsrahatepravinsrahate Posts: 4Member
    This post has been deleted.
Sign In or Register to comment.