Commit Graph

27 Commits

Author SHA1 Message Date
Sebastian Huber
252e244e6d smp: Documentation 2015-09-04 13:47:30 +02:00
Sebastian Huber
e1769f2764 smp: Documentation
Close #2274.
2015-09-04 13:44:47 +02:00
Sebastian Huber
dafa5d8843 score: Implement priority boosting 2015-09-04 13:26:17 +02:00
Sebastian Huber
3995e6d9c2 score: Implement SMP-specific priority queue 2015-09-04 13:25:03 +02:00
Sebastian Huber
cee82dfb26 smp: Documentation 2015-09-04 13:14:50 +02:00
Sebastian Huber
06496fba0a smp: Documentation 2015-09-04 13:09:17 +02:00
Sebastian Huber
9154c3f99a doc: Add thread dispatch details for SMP 2015-07-17 11:57:38 +02:00
Sebastian Huber
3bb342ca92 doc: Clarify interrupts disable problems on SMP 2015-07-17 11:57:08 +02:00
Sebastian Huber
b56ddbbd84 doc: Fix SMP task variables section 2015-07-17 09:21:46 +02:00
Sebastian Huber
5c3d250959 score: Implement scheduler helping protocol
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.
2014-07-09 10:05:17 +02:00
Sebastian Huber
25f5730fe5 score: _Scheduler_Set_affinity()
Do not change the scheduler with this function.  Documentation.  Coding
style.
2014-06-02 08:28:42 +02:00
Sebastian Huber
e5274df1d9 rtems: Clarify task set/get scheduler parameters 2014-05-20 10:03:35 +02:00
Sebastian Huber
29e6637eb1 doc: Move SMP glossary to global glossary
Add some terms.
2014-05-08 08:43:45 +02:00
Sebastian Huber
38b59a6d30 score: Implement forced thread migration
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.
2014-05-07 14:26:28 +02:00
Sebastian Huber
e239760f6a score: SMP_FATAL_SCHEDULER_WITHOUT_PROCESSORS
Avoid the SMP_FATAL_SCHEDULER_WITHOUT_PROCESSORS fatal error and make it
a run-time error in rtems_scheduler_ident() and _Scheduler_Get_by_id().
2014-05-05 08:26:27 +02:00
Sebastian Huber
d20b029af9 doc: Add SMP glossary 2014-05-05 08:26:27 +02:00
Sebastian Huber
fab2f1885c doc: Setting Affinity to a Single Processor 2014-04-22 08:34:45 +02:00
Sebastian Huber
f8300293ae doc: rtems_task_set_scheduler() 2014-04-17 08:06:39 +02:00
Sebastian Huber
babb1a2ce8 doc: rtems_task_get_scheduler() 2014-04-17 08:06:39 +02:00
Sebastian Huber
d1f2f222d2 doc: rtems_scheduler_get_processor_set() 2014-04-17 08:06:39 +02:00
Sebastian Huber
89c1a21f9c doc: rtems_scheduler_ident() 2014-04-17 08:06:38 +02:00
Sebastian Huber
ed859d514a doc: rtems_task_set_affinity() 2014-04-17 08:06:38 +02:00
Sebastian Huber
2be51ccf6e doc: rtems_task_get_affinity() 2014-04-17 08:06:38 +02:00
Sebastian Huber
4a93980a14 doc: rtems_get_current_processor() 2014-04-17 08:06:38 +02:00
Sebastian Huber
6809383d76 doc: rtems_get_processor_count() 2014-04-17 08:06:38 +02:00
Joel Sherrill
89e72a80c9 smp.t: Add Background and Operation Sections 2014-03-11 19:03:53 -05:00
Joel Sherrill
d46ab11bcd Classic API Users Guide: Add SMP and affinity services.
This patch adds the initial version of the SMP chapter to the Users Guide.
2014-03-11 16:27:57 -05:00