Symbian3/PDK/Source/GUID-387E98B0-568D-4DBB-9A9E-616E41E96B58.dita
changeset 1 25a17d01db0c
child 3 46218c8b8afa
equal deleted inserted replaced
0:89d6a7a84779 1:25a17d01db0c
       
     1 <?xml version="1.0" encoding="utf-8"?>
       
     2 <!-- Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved. -->
       
     3 <!-- This component and the accompanying materials are made available under the terms of the License 
       
     4 "Eclipse Public License v1.0" which accompanies this distribution, 
       
     5 and is available at the URL "http://www.eclipse.org/legal/epl-v10.html". -->
       
     6 <!-- Initial Contributors:
       
     7     Nokia Corporation - initial contribution.
       
     8 Contributors: 
       
     9 -->
       
    10 <!DOCTYPE concept
       
    11   PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd">
       
    12 <concept id="GUID-387E98B0-568D-4DBB-9A9E-616E41E96B58" xml:lang="en"><title>SMP
       
    13 Overview</title><shortdesc>This document introduces Symmetric Multiprocessing (SMP) on the
       
    14 Symbian platform.</shortdesc><prolog><metadata><keywords/></metadata></prolog><conbody>
       
    15 <section id="GUID-105AFE3B-F000-4548-B57E-4A5EAEBA2645"><title>Purpose</title> 
       
    16      <p>An SMP operating system enables any CPU to work on any task, enabling
       
    17 multiple threads (processes or multiple threads within a process, and therefore
       
    18 applications) to run in parallel. </p><p>A system with 2 CPUs, for example,
       
    19 can allow 2 threads to run concurrently; one on each processor. This provides
       
    20 better responsiveness and asynchronicity compared to a system with a single
       
    21 CPU.</p><p>An SMP system can deliver a similar level of CPU performance as
       
    22 a larger and faster uni-processor CPU, while using less power. SMP also provides
       
    23 additional power management flexibility, running a single CPU when the system
       
    24 is under utilised then switching on extra CPUs to give scalable performance
       
    25 on demand for media rich applications. The ARM SMP architecture allows power
       
    26 control with voltage / frequency scaling and the ability to switch individual
       
    27 cores on and off.</p><p>However, the benefits of SMP come at the cost of OS
       
    28 and application complexity (the requirement of extra locks and the multithreading
       
    29 of code) and the associated debugging challenges of parallel processing.</p> 
       
    30    </section>
       
    31 <section id="GUID-38C8CACC-0CCD-460B-9713-B33FF79FE75B"><title>Description</title><p>SMP
       
    32 is a microprocessor architecture where two or more identical CPUs are connected
       
    33 to a single shared main memory system and run a single OS instance. </p><p>The
       
    34 diagram below shows how this would apply on the Symbian platform with four
       
    35 CPU cores. <fig id="GUID-FBBCE840-E295-4287-BA10-DF37292D432B">
       
    36 <title>The Simplified Architecture of an SMP Platform Executing on the Symbian
       
    37 Platform.  </title>
       
    38 <image href="GUID-85A84BAA-4FA2-4A26-A8B1-57018D8838C3_d0e638374_href.jpg" placement="inline"/>
       
    39 </fig></p><p>The figure shows a simplified block diagram of an SMP system,
       
    40 where 4 CPUs are connected through their own cache to shared RAM and peripherals.
       
    41 The Cache Coherency Control block is responsible for ensuring that each CPU
       
    42 cache is consistent with those of the other CPUs. A single instance of OS
       
    43 spans the CPUs, the scheduler decides which thread to execute next and upon
       
    44 which CPU it should execute. </p></section>
       
    45 <section id="GUID-1672A908-7BE6-4261-997B-2495C598A6E0"><title>SMP features</title><p>The
       
    46 features of the SMP platform are: <ul>
       
    47 <li><p><b>Better responsiveness</b></p><p>One or more CPU cores can be dedicated
       
    48 to IO related work. </p></li>
       
    49 <li><p><b>High performance on demand</b></p><p>Work can be moved onto CPUs
       
    50 when required. </p></li>
       
    51 <li><p><b>Flexible power management</b></p><p> CPU cores can be switched on
       
    52 or off, or voltage/frequency scaled, according to the current processing requirements
       
    53 of the system.</p><p>This can lead to improved battery life because the system
       
    54 only uses as much processing power as required at any given time.</p></li>
       
    55 <li><p><b>Scalable architecture</b></p><p>SMP can work over two or more CPU
       
    56 cores. </p></li>
       
    57 </ul></p></section>
       
    58 <section id="GUID-D4A04CA3-2E37-4DE1-BF98-C08365F8DFB0"><title>SMP limitations</title><p>The
       
    59 disadvantages of using SMP are: </p><ul>
       
    60 <li><p><b>The original emulator for the Symbian platform will not emulate
       
    61 an SMP environment</b></p><p>The emulator is being replaced by a new emulation
       
    62 environment that is capable of simulating the multiprocessor environment.</p></li>
       
    63 <li><p><b>Software changes are required</b></p><p>Assumptions that can be
       
    64 made in a single core environment, are not necessarily true on a multi-core
       
    65 system. The SMP-safe documentation you are reading now will provide you with
       
    66 guidance on a number of issues sure to come up while migrating your software
       
    67 to work in an SMP environment.</p></li>
       
    68 <li><p><b>Debugging Challenges</b></p><p>Debugging on a multi-processor system
       
    69 is extremely difficult. The standard tooling solutions, such as the Lauterbach
       
    70 debugger and BTrace2 (also known as the modified BTrace) have been revised
       
    71 to handle the special requirements of an SMP system.</p></li>
       
    72 <li><p><b>Access to memory is serialized</b></p><p>All the CPU cores use the
       
    73 same memory, memory access must occur serially. This can cause a performance
       
    74 lag. </p></li>
       
    75 </ul></section>
       
    76 </conbody><related-links>
       
    77 <link href="GUID-242D9F27-401B-4230-B3A6-11E2D9D3DE17.dita"><linktext>SMP - Threading
       
    78 Model</linktext></link>
       
    79 <link href="GUID-16AED228-539F-4BF7-A7FD-9A01FF1A9A84.dita"><linktext>SMP - Locking</linktext>
       
    80 </link>
       
    81 <link href="GUID-9D93F895-B975-4F2D-A2A3-817033EA5C12.dita"><linktext>SMP - Data
       
    82 Integrity and memory barriers</linktext></link>
       
    83 <link href="GUID-A3647D6A-4B5E-4A31-8A53-AC822E669AB6.dita"><linktext>SMP - SMP
       
    84 Scheduling</linktext></link>
       
    85 <link href="GUID-821C254A-40C6-45F9-B2F9-2CF28CAEB8CC.dita"><linktext>SMP - Interrupt
       
    86 Handling</linktext></link>
       
    87 <link href="GUID-734588CA-5644-438A-9CC9-77ECBE0C1EEA.dita"><linktext>SMP - Obsolete
       
    88 Mechanisms</linktext></link>
       
    89 <link href="GUID-EE019780-130A-4469-924D-E83D74C2ABE5.dita"><linktext>SMP - Building
       
    90 For An SMP Platform</linktext></link>
       
    91 <link href="GUID-F44ED3DD-F74F-4C79-8E56-1CBBCCA90C91.dita"><linktext>SMP - Porting
       
    92 Guide</linktext></link>
       
    93 <link href="GUID-6B8B45E5-1594-455E-9FAE-0A7768305F95.dita"><linktext>SMP - Development
       
    94 Tips For Making Code SMP Safe</linktext></link>
       
    95 <link href="GUID-C8E61F9D-54E7-4B93-9726-6E96D79334F9.dita"><linktext>SMP - Hardware
       
    96 Platforms</linktext></link>
       
    97 <link href="GUID-F23E0D38-65C2-40B9-AC19-F5AEBBEB2E82.dita"><linktext>SMP - Debugging
       
    98 In An SMP Environment</linktext></link>
       
    99 <link href="GUID-23BD6377-CE67-46CC-8311-D40D34BCFB6A.dita"><linktext>SMP - Tutorial
       
   100 Overview</linktext></link>
       
   101 </related-links></concept>