Changeset 82db8e56 in rtems


Ignore:
Timestamp:
09/15/11 15:49:32 (12 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.11, 5, master
Children:
bd1b8de
Parents:
baef6771
Message:

2011-09-15 Petr Benes <benesp16@…>

PR 1906/cpukit

  • sapi/Makefile.am, sapi/preinstall.am, sapi/include/confdefs.h, score/Makefile.am, score/preinstall.am: Add the CBS (Constant Bandwidth Server) scheduler. This is a complex scheduling policy built atop of the EDF scheduler. Unlike other schedulers, this one provides a user API and handles not only deadlines of tasks but also claimed budget per period. The main aim of the scheduler is isolation of tasks so that each task is guaranteed to meet all deadlines regardless of how other tasks behave.
  • sapi/include/rtems/cbs.h, sapi/inline/rtems/cbs.inl, score/include/rtems/score/schedulercbs.h, score/src/schedulercbs.c, score/src/schedulercbsattachthread.c, score/src/schedulercbscleanup.c, score/src/schedulercbscreateserver.c, score/src/schedulercbsdestroyserver.c, score/src/schedulercbsdetachthread.c, score/src/schedulercbsgetapprovedbudget.c, score/src/schedulercbsgetexecutiontime.c, score/src/schedulercbsgetparameters.c, score/src/schedulercbsgetremainingbudget.c, score/src/schedulercbsgetserverid.c, score/src/schedulercbsreleasejob.c, score/src/schedulercbssetparameters.c, score/src/schedulercbsunblock.c: New files.
Location:
cpukit
Files:
17 added
6 edited

Legend:

Unmodified
Added
Removed
  • cpukit/ChangeLog

    rbaef6771 r82db8e56  
     12011-09-15      Petr Benes <benesp16@fel.cvut.cz>
     2
     3        PR 1906/cpukit
     4        * sapi/Makefile.am, sapi/preinstall.am, sapi/include/confdefs.h,
     5        score/Makefile.am, score/preinstall.am: Add the CBS (Constant
     6        Bandwidth Server) scheduler. This is a complex scheduling policy
     7        built atop of the EDF scheduler. Unlike other schedulers, this one
     8        provides a user API and handles not only deadlines of tasks but also
     9        claimed budget per period. The main aim of the scheduler is isolation
     10        of tasks so that each task is guaranteed to meet all deadlines
     11        regardless of how other tasks behave.
     12        * sapi/include/rtems/cbs.h, sapi/inline/rtems/cbs.inl,
     13        score/include/rtems/score/schedulercbs.h, score/src/schedulercbs.c,
     14        score/src/schedulercbsattachthread.c,
     15        score/src/schedulercbscleanup.c,
     16        score/src/schedulercbscreateserver.c,
     17        score/src/schedulercbsdestroyserver.c,
     18        score/src/schedulercbsdetachthread.c,
     19        score/src/schedulercbsgetapprovedbudget.c,
     20        score/src/schedulercbsgetexecutiontime.c,
     21        score/src/schedulercbsgetparameters.c,
     22        score/src/schedulercbsgetremainingbudget.c,
     23        score/src/schedulercbsgetserverid.c,
     24        score/src/schedulercbsreleasejob.c,
     25        score/src/schedulercbssetparameters.c,
     26        score/src/schedulercbsunblock.c: New files.
     27
    1282011-09-15      Sebastian Huber <sebastian.huber@embedded-brains.de>
    229
  • cpukit/sapi/Makefile.am

    rbaef6771 r82db8e56  
    1616include_rtems_HEADERS += include/rtems/io.h
    1717include_rtems_HEADERS += include/rtems/mptables.h
     18include_rtems_HEADERS += include/rtems/cbs.h
    1819include_rtems_HEADERS += include/rtems/rbtree.h
    1920include_rtems_HEADERS += include/rtems/sptables.h
     
    2324include_rtems_HEADERS += inline/rtems/chain.inl
    2425include_rtems_HEADERS += inline/rtems/extension.inl
     26include_rtems_HEADERS += inline/rtems/cbs.inl
    2527include_rtems_HEADERS += inline/rtems/rbtree.inl
    2628
  • cpukit/sapi/include/confdefs.h

    rbaef6771 r82db8e56  
    575575 *  CONFIGURE_SCHEDULER_SIMPLE_SMP - Simple SMP Priority Scheduler
    576576 *  CONFIGURE_SCHEDULER_EDF        - EDF Scheduler
     577 *  CONFIGURE_SCHEDULER_CBS        - CBS Scheduler
    577578 *
    578579 * If no configuration is specified by the application, then
     
    601602    !defined(CONFIGURE_SCHEDULER_SIMPLE) && \
    602603    !defined(CONFIGURE_SCHEDULER_SIMPLE_SMP) && \
    603     !defined(CONFIGURE_SCHEDULER_EDF)
     604    !defined(CONFIGURE_SCHEDULER_EDF) && \
     605    !defined(CONFIGURE_SCHEDULER_CBS)
    604606  #if defined(RTEMS_SMP) && defined(CONFIGURE_SMP_APPLICATION)
    605607    #define CONFIGURE_SCHEDULER_SIMPLE_SMP
     
    675677  #define CONFIGURE_MEMORY_PER_TASK_FOR_SCHEDULER ( \
    676678    _Configure_From_workspace(sizeof(Scheduler_EDF_Per_thread)))
     679#endif
     680
     681/*
     682 * If the CBS Scheduler is selected, then configure for it.
     683 */
     684#if defined(CONFIGURE_SCHEDULER_CBS)
     685  #include <rtems/score/schedulercbs.h>
     686  #define CONFIGURE_SCHEDULER_ENTRY_POINTS SCHEDULER_CBS_ENTRY_POINTS
     687
     688  #ifndef CONFIGURE_CBS_MAXIMUM_SERVERS
     689    #define CONFIGURE_CBS_MAXIMUM_SERVERS CONFIGURE_MAXIMUM_TASKS
     690  #endif
     691
     692  #ifdef CONFIGURE_INIT
     693    uint32_t _Scheduler_CBS_Maximum_servers = CONFIGURE_CBS_MAXIMUM_SERVERS;
     694  #endif
     695
     696  /**
     697   * define the memory used by the CBS scheduler
     698   */
     699  #define CONFIGURE_MEMORY_FOR_SCHEDULER ( \
     700    _Configure_From_workspace((sizeof(Scheduler_CBS_Server) + \
     701        sizeof(Scheduler_CBS_Server*)) * CONFIGURE_CBS_MAXIMUM_SERVERS))
     702  #define CONFIGURE_MEMORY_PER_TASK_FOR_SCHEDULER ( \
     703    _Configure_From_workspace(sizeof(Scheduler_CBS_Per_thread)))
    677704#endif
    678705
  • cpukit/sapi/preinstall.am

    rbaef6771 r82db8e56  
    6161PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/mptables.h
    6262
     63$(PROJECT_INCLUDE)/rtems/cbs.h: include/rtems/cbs.h $(PROJECT_INCLUDE)/rtems/$(dirstamp)
     64        $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/cbs.h
     65PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/cbs.h
     66
    6367$(PROJECT_INCLUDE)/rtems/rbtree.h: include/rtems/rbtree.h $(PROJECT_INCLUDE)/rtems/$(dirstamp)
    6468        $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/rbtree.h
     
    7781PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/extension.inl
    7882
     83$(PROJECT_INCLUDE)/rtems/cbs.inl: inline/rtems/cbs.inl $(PROJECT_INCLUDE)/rtems/$(dirstamp)
     84        $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/cbs.inl
     85PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/cbs.inl
     86
    7987$(PROJECT_INCLUDE)/rtems/rbtree.inl: inline/rtems/rbtree.inl $(PROJECT_INCLUDE)/rtems/$(dirstamp)
    8088        $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/rbtree.inl
  • cpukit/score/Makefile.am

    rbaef6771 r82db8e56  
    4141include_rtems_score_HEADERS += include/rtems/score/rbtree.h
    4242include_rtems_score_HEADERS += include/rtems/score/scheduler.h
     43include_rtems_score_HEADERS += include/rtems/score/schedulercbs.h
    4344include_rtems_score_HEADERS += include/rtems/score/scheduleredf.h
    4445include_rtems_score_HEADERS += include/rtems/score/schedulerpriority.h
     
    239240    src/scheduleredfyield.c
    240241
     242## SCHEDULERCBS_C_FILES
     243libscore_a_SOURCES += src/schedulercbs.c \
     244    src/schedulercbsattachthread.c \
     245    src/schedulercbscleanup.c \
     246    src/schedulercbscreateserver.c \
     247    src/schedulercbsdestroyserver.c \
     248    src/schedulercbsdetachthread.c \
     249    src/schedulercbsgetapprovedbudget.c \
     250    src/schedulercbsgetexecutiontime.c \
     251    src/schedulercbsgetparameters.c \
     252    src/schedulercbsgetremainingbudget.c \
     253    src/schedulercbsgetserverid.c \
     254    src/schedulercbssetparameters.c \
     255    src/schedulercbsreleasejob.c \
     256    src/schedulercbsunblock.c
     257
    241258## PROTECTED_HEAP_C_FILES
    242259libscore_a_SOURCES += src/pheapallocate.c \
  • cpukit/score/preinstall.am

    rbaef6771 r82db8e56  
    128128PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/score/scheduler.h
    129129
     130$(PROJECT_INCLUDE)/rtems/score/schedulercbs.h: include/rtems/score/schedulercbs.h $(PROJECT_INCLUDE)/rtems/score/$(dirstamp)
     131        $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/score/schedulercbs.h
     132PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/score/schedulercbs.h
     133
    130134$(PROJECT_INCLUDE)/rtems/score/scheduleredf.h: include/rtems/score/scheduleredf.h $(PROJECT_INCLUDE)/rtems/score/$(dirstamp)
    131135        $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/score/scheduleredf.h
Note: See TracChangeset for help on using the changeset viewer.