Describes the impacts of thread execution in SMP environment.
In single core system, the active threads are executed in a time-sliced fashion and appear to run in parallel. In a multi-core environment, multiple threads can be executed in parallel and can also use time-sliced thread execution.
Most servers on Symbian platform are single threaded and are unlikely to need any modification to migrate to a multi-core hardware. Some servers may need to service multiple clients concurrently. One of the solutions to take advantage of SMP hardware is to modify the servers to have multiple threads to service the clients concurrently. The performance can also be improved by implementing caching in the server.
Active schedulers are designed to be single threaded and the active objects never run concurrently because there is no need for a lock in the data shared between active objects. The active scheduler will only execute one active object at a time. The existing code should run safely on multi-core hardware. If the active objects need to use multiple cores then the code should be modified to be multi-threaded and use locks when there is shared data between the threads.
The user-side applications that use Symbian platform Inter Process Communication (IPC) functions like RThread::Rendezvous(), User::RequestComplete(), RSession::SendReceive() or Publish-Subscribe should run safely on multi-core hardware. If the user-side code uses some proprietary IPC mechanism to communicate with other process, that code may need to be modified to use Symbian IPC functions.
Single-threaded applications | Multi-threaded applications |
---|---|
Low CPU usage for schedulers | Parallel execution provides faster execution |
Low memory overhead | Added control on power consumption |
Low cache overhead | Servers that have to service multiple clients can run on different CPUs |
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.