03.01.2013 Views

Chapter 1

Chapter 1

Chapter 1

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Most servers use their own .exe to generate their own process. For instance, ewsrv.exe is<br />

the window server and efile.exe is the file server.<br />

As we saw earlier, some servers piggyback into the process of others to minimize contextswitching<br />

overheads. The main server in such a group uses its own process – for instance,<br />

c32exe.exe launches the serial communications server. Other servers use a DLL and<br />

launch their own thread within the main server thread.<br />

A console application, such as hellotext.exe, is built into its own .exe. A console application<br />

must create its own console, which it can then use to interact with the user.<br />

Most GUI applications are like hellogui.app. They are actually polymorphic DLLs whose main<br />

entry point, NewApplication(), creates and returns a CEikApplication-derived object.<br />

The application process is created by a small .exe, apprun.exe, to which the .app name is<br />

passed as a parameter. If the application wants to edit an embedded document, it can do so<br />

without creating a new process by loading the.app for the embedded document directly in<br />

the same thread.<br />

2.5 Power Management<br />

Power management is probably the single most difference between a desktop system and a<br />

portable system:<br />

� Power has to be used efficiently. Battery life – even with rechargeable batteries –<br />

makes a difference to how the user thinks of the device. So also does battery weight.<br />

Symbian OS needs to work effectively on lower-speed, lower-power hardware, than that<br />

used by desktop PCs.<br />

� Certain parts of the system should still be able to run while the system is apparently<br />

off. For example, when an alarm is due, the machine should be turned on so that the<br />

alarm can sound. For modern smartphones, the phone may need to react to an<br />

incoming call or SMS. This means that the system should switch from a low power<br />

mode to being in an active state.<br />

� Even if all power is removed suddenly, the system should do what it can to save critical<br />

information, so that there is a possibility of a warm boot when power returns (rather than<br />

a cold boot).<br />

As an application or server programmer, your task is easier than that of the kernel. But, you<br />

still get involved in power management. You have to write your programs efficiently to make<br />

the best use of a Symbian OS phone's scarce resources – this applies as much to power as<br />

to available RAM, CPU speed, and so on.<br />

The deeper you delve into the system, the more complicated power management becomes.<br />

For instance, as a device driver programmer, you can see that power management is more<br />

complex than simply machine on/off. The user thinks the machine is off if the display is<br />

turned off. But each hardware component is responsible for its own power management. A<br />

communications link driver should turn the physical device off if it's not needed. The kernel<br />

scheduler even turns the CPU off if all threads are waiting for an event. Every possible step<br />

is taken to save power and ensure that user data is retained even in the most difficult powerloss<br />

situations.<br />

2.6 The Kernel and E32<br />

The most fundamental component of Symbian OS is E32. E32 consists of the kernel and<br />

user library. The kernel is entirely privileged. The user library, euser.dll, is the lowestlevel<br />

user-mode code. It offers library functions to other user-mode code and controlled<br />

access to the kernel.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!