summaryrefslogtreecommitdiffstats
path: root/cpukit/score/include/rtems/score/schedulersmp.h (follow)
Commit message (Collapse)AuthorAgeFilesLines
* score: Clarify _Scheduler_SMP_Start_idle()Sebastian Huber2016-11-091-2/+2
|
* score: Simplify <rtems/score/scheduler.h>Sebastian Huber2015-06-261-1/+1
| | | | | Drop the <rtems/score/percpu.h> include since this file exposes a lot of implementation details.
* score: Fix scheduler helping implementationSebastian Huber2014-07-101-0/+4
| | | | | Do not extract the idle threads from the ready set so that there is always a thread available for comparison.
* score: Implement scheduler helping protocolSebastian Huber2014-07-091-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | The following scheduler operations return a thread in need for help - unblock, - change priority, and - yield. A thread in need for help is a thread that encounters a scheduler state change from scheduled to ready or a thread that cannot be scheduled in an unblock operation. Such a thread can ask threads which depend on resources owned by this thread for help. Add a new ask for help scheduler operation. This operation is used by _Scheduler_Ask_for_help() to help threads in need for help returned by the operations mentioned above. This operation is also used by _Scheduler_Thread_change_resource_root() in case the root of a resource sub-tree changes. A use case is the ownership change of a resource. In case it is not possible to schedule a thread in need for help, then the corresponding scheduler node will be placed into the set of ready scheduler nodes of the scheduler instance. Once a state change from ready to scheduled happens for this scheduler node it may be used to schedule the thread in need for help.
* score: Decouple thread and scheduler nodes on SMPSebastian Huber2014-06-231-0/+5
| | | | | | | Add a chain node to the scheduler node to decouple the thread and scheduler nodes. It is now possible to enqueue a thread in a thread wait queue and use its scheduler node at the same for other threads, e.g. a resouce owner.
* score: Add and use _Scheduler_SMP_Start_idle()Sebastian Huber2014-05-151-0/+6
|
* score: Simplify _Thread_Change_priority()Sebastian Huber2014-05-151-18/+3
| | | | | | | | | | | | | | | | | | | | | | | | The function to change a thread priority was too complex. Simplify it with a new scheduler operation. This increases the average case performance due to the simplified logic. The interrupt disabled critical section is a bit prolonged since now the extract, update and enqueue steps are executed atomically. This should however not impact the worst-case interrupt latency since at least for the Deterministic Priority Scheduler this sequence can be carried out with a wee bit of instructions and no loops. Add _Scheduler_Change_priority() to replace the sequence of - _Thread_Set_transient(), - _Scheduler_Extract(), - _Scheduler_Enqueue(), and - _Scheduler_Enqueue_first(). Delete STATES_TRANSIENT, _States_Is_transient() and _Thread_Set_transient() since this state is now superfluous. With this change it is possible to get rid of the SCHEDULER_SMP_NODE_IN_THE_AIR state. This considerably simplifies the implementation of the new SMP locking protocols.
* score: Introduce scheduler nodesSebastian Huber2014-05-141-0/+66
| | | | | | | | | | | | Rename scheduler per-thread information into scheduler nodes using Scheduler_Node as the base type. Use inheritance for specialized schedulers. Move the scheduler specific states from the thread control block into the scheduler node structure. Validate the SMP scheduler node state transitions in case RTEMS_DEBUG is defined.
* score: Implement forced thread migrationSebastian Huber2014-05-071-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | The current implementation of task migration in RTEMS has some implications with respect to the interrupt latency. It is crucial to preserve the system invariant that a task can execute on at most one processor in the system at a time. This is accomplished with a boolean indicator in the task context. The processor architecture specific low-level task context switch code will mark that a task context is no longer executing and waits that the heir context stopped execution before it restores the heir context and resumes execution of the heir task. So there is one point in time in which a processor is without a task. This is essential to avoid cyclic dependencies in case multiple tasks migrate at once. Otherwise some supervising entity is necessary to prevent life-locks. Such a global supervisor would lead to scalability problems so this approach is not used. Currently the thread dispatch is performed with interrupts disabled. So in case the heir task is currently executing on another processor then this prolongs the time of disabled interrupts since one processor has to wait for another processor to make progress. It is difficult to avoid this issue with the interrupt latency since interrupts normally store the context of the interrupted task on its stack. In case a task is marked as not executing we must not use its task stack to store such an interrupt context. We cannot use the heir stack before it stopped execution on another processor. So if we enable interrupts during this transition we have to provide an alternative task independent stack for this time frame. This issue needs further investigation.
* score: Static scheduler configurationSebastian Huber2014-04-151-12/+6
| | | | | | Do not allocate the scheduler control structures from the workspace. This is a preparation step for configuration of clustered/partitioned schedulers on SMP.
* score: Move priority bit map to scheduler instanceSebastian Huber2014-04-031-7/+13
| | | | | | Delete global variables _Priority_Major_bit_map and _Priority_Bit_map. This makes it possible to use multiple priority scheduler instances for example with clustered/partitioned scheduling on SMP.
* Change all references of rtems.com to rtems.org.Chris Johns2014-03-211-1/+1
|
* smp: Rename _Scheduler_simple_smp_Start_idle()Sebastian Huber2013-08-201-0/+7
| | | | | Rename _Scheduler_simple_smp_Start_idle() to _Scheduler_SMP_Start_idle().
* smp: Replace Scheduler_simple_smp_ControlSebastian Huber2013-08-201-0/+51
Replace Scheduler_simple_smp_Control with Scheduler_SMP_Control. Rename _Scheduler_simple_smp_Instance() to _Scheduler_SMP_Instance().