Changeset 785c02f in rtems-docs
- Timestamp:
- 02/02/17 13:07:53 (7 years ago)
- Branches:
- 5, master
- Children:
- 87b4d03
- Parents:
- 3e005fe
- Files:
-
- 4 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
c-user/glossary.rst
r3e005fe r785c02f 14 14 A task which must execute only at irregular intervals and has only a soft 15 15 deadline. 16 17 API 18 An acronym for Application Programming Interface. 16 19 17 20 application … … 315 318 over resources. 316 319 320 MCS 321 An acronym for Mellor-Crummey Scott. 322 317 323 memory pool 318 324 Used interchangeably with heap. … … 379 385 non-existent 380 386 The state occupied by an uncreated or deleted task. 387 388 NUMA 389 An acronym for Non-Uniform Memory Access. 381 390 382 391 numeric coprocessor … … 614 623 SMCB 615 624 An acronym for Semaphore Control Block. 625 626 SMP 627 An acronym for Symmetric Multiprocessing. 616 628 617 629 SMP locks -
c-user/symmetric_multiprocessing_services.rst
r3e005fe r785c02f 525 525 Therefore, self-contained synchronization objects are now available for RTEMS. 526 526 527 Directives 528 ========== 529 530 This section details the symmetric multiprocessing services. A subsection is 531 dedicated to each of these services and describes the calling sequence, related 532 constants, usage, and status codes. 533 534 .. raw:: latex 535 536 \clearpage 537 538 .. _rtems_get_processor_count: 539 540 GET_PROCESSOR_COUNT - Get processor count 541 ----------------------------------------- 542 543 CALLING SEQUENCE: 544 .. code-block:: c 545 546 uint32_t rtems_get_processor_count(void); 547 548 DIRECTIVE STATUS CODES: 549 The count of processors in the system. 550 551 DESCRIPTION: 552 In uni-processor configurations, a value of one will be returned. 553 554 In SMP configurations, this returns the value of a global variable set 555 during system initialization to indicate the count of utilized processors. 556 The processor count depends on the physically or virtually available 557 processors and application configuration. The value will always be less 558 than or equal to the maximum count of application configured processors. 559 560 NOTES: 561 None. 562 563 .. raw:: latex 564 565 \clearpage 566 567 .. _rtems_get_current_processor: 568 569 GET_CURRENT_PROCESSOR - Get current processor index 570 --------------------------------------------------- 571 572 CALLING SEQUENCE: 573 .. code-block:: c 574 575 uint32_t rtems_get_current_processor(void); 576 577 DIRECTIVE STATUS CODES: 578 The index of the current processor. 579 580 DESCRIPTION: 581 In uni-processor configurations, a value of zero will be returned. 582 583 In SMP configurations, an architecture specific method is used to obtain the 584 index of the current processor in the system. The set of processor indices 585 is the range of integers starting with zero up to the processor count minus 586 one. 587 588 Outside of sections with disabled thread dispatching the current processor 589 index may change after every instruction since the thread may migrate from 590 one processor to another. Sections with disabled interrupts are sections 591 with thread dispatching disabled. 592 593 NOTES: 594 None. 595 527 596 Implementation Details 528 597 ====================== 598 599 This section covers some implementation details of the RTEMS SMP support. 600 601 Low-Level Synchronization 602 ------------------------- 603 604 All low-level synchronization primitives are implemented using :term:`C11` 605 atomic operations, so no target-specific hand-written assembler code is 606 necessary. Four synchronization primitives are currently available 607 608 * ticket locks (mutual exclusion), 609 610 * :term:`MCS` locks (mutual exclusion), 611 612 * barriers, implemented as a sense barrier, and 613 614 * sequence locks :cite:`Boehm:2012:Seqlock`. 615 616 A vital requirement for low-level mutual exclusion is :term:`FIFO` fairness 617 since we are interested in a predictable system and not maximum throughput. 618 With this requirement, there are only few options to resolve this problem. For 619 reasons of simplicity, the ticket lock algorithm was chosen to implement the 620 SMP locks. However, the API is capable to support MCS locks, which may be 621 interesting in the future for systems with a processor count in the range of 32 622 or more, e.g. :term:`NUMA`, many-core systems. 623 624 The test program `SMPLOCK 1 625 <https://git.rtems.org/rtems/tree/testsuites/smptests/smplock01>`_ can be used 626 to gather performance and fairness data for several scenarios. The SMP lock 627 performance and fairness measured on the QorIQ T4240 follows as an example. 628 This chip contains three L2 caches. Each L2 cache is shared by eight 629 processors. 630 631 .. image:: ../images/c_user/smplock01perf-t4240.* 632 :width: 400 633 :align: center 634 635 .. image:: ../images/c_user/smplock01fair-t4240.* 636 :width: 400 637 :align: center 529 638 530 639 Thread Dispatch Details … … 565 674 temporary per-processor stack is set up which may be used by the interrupt 566 675 prologue before the stack is switched to the interrupt stack. 567 568 Directives569 ==========570 571 This section details the symmetric multiprocessing services. A subsection is572 dedicated to each of these services and describes the calling sequence, related573 constants, usage, and status codes.574 575 .. raw:: latex576 577 \clearpage578 579 .. _rtems_get_processor_count:580 581 GET_PROCESSOR_COUNT - Get processor count582 -----------------------------------------583 584 CALLING SEQUENCE:585 .. code-block:: c586 587 uint32_t rtems_get_processor_count(void);588 589 DIRECTIVE STATUS CODES:590 The count of processors in the system.591 592 DESCRIPTION:593 In uni-processor configurations, a value of one will be returned.594 595 In SMP configurations, this returns the value of a global variable set596 during system initialization to indicate the count of utilized processors.597 The processor count depends on the physically or virtually available598 processors and application configuration. The value will always be less599 than or equal to the maximum count of application configured processors.600 601 NOTES:602 None.603 604 .. raw:: latex605 606 \clearpage607 608 .. _rtems_get_current_processor:609 610 GET_CURRENT_PROCESSOR - Get current processor index611 ---------------------------------------------------612 613 CALLING SEQUENCE:614 .. code-block:: c615 616 uint32_t rtems_get_current_processor(void);617 618 DIRECTIVE STATUS CODES:619 The index of the current processor.620 621 DESCRIPTION:622 In uni-processor configurations, a value of zero will be returned.623 624 In SMP configurations, an architecture specific method is used to obtain the625 index of the current processor in the system. The set of processor indices626 is the range of integers starting with zero up to the processor count minus627 one.628 629 Outside of sections with disabled thread dispatching the current processor630 index may change after every instruction since the thread may migrate from631 one processor to another. Sections with disabled interrupts are sections632 with thread dispatching disabled.633 634 NOTES:635 None.
Note: See TracChangeset
for help on using the changeset viewer.