03.01.2013 Views

Chapter 1

Chapter 1

Chapter 1

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

The kernel itself has two major components:<br />

� The kernel executive runs privileged code on behalf of a user thread, and runs in the<br />

context of that user thread.<br />

� The kernel server is the main thread of its own process and always runs privileged.<br />

The kernel server is the highest-priority thread in the system. It allocates and<br />

deallocates kernel-side resources needed by the system and by user programs. It also<br />

performs functions on behalf of user-mode programs. The kernel server is a single<br />

thread: it handles user requests in sequence, non-preemptively.<br />

Figure 2.5<br />

We'll be describing euser.dll's most important facilities in detail over the next few<br />

chapters. For now, let's note that it offers three types of functions:<br />

� Functions that execute entirely user-side, such as most functions in the array and<br />

descriptor classes (descriptors are the Symbian OS version of strings).<br />

� Functions that require privilege, and so cross into the executive, such as checking the<br />

time or locale settings.<br />

� Functions that require the services of the kernel server: these go through the user<br />

library, via the executive, to the server.<br />

The functions that operate entirely on the user-side can also be used safely by any kernelside<br />

code. Kernel-side code that needs access to kernel facilities can (and must) use these<br />

facilities directly rather than through the user library interface.<br />

In this book, we'll be writing user-side code exclusively. So, although the distinction between<br />

the types of function in the user library helps you to understand the system design, it's not<br />

essential for you to know all the possible circumstances in which kernel-side code might be<br />

called.<br />

2.7 Device Drivers<br />

System devices such as screen, keyboard, digitizer (for the pen), sound codec, status LEDs,<br />

power sensors, serial port, CF-card, and so on are all driven by low-level device drivers. It's<br />

possible to add devices and write drivers for them. Symbian OS OEMs usually do this:<br />

Symbian OS phones are not typically user-expandable in the same way that PCs are.<br />

A device driver is implemented in several parts as shown in Figure 2.6:

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

Saved successfully!

Ooh no, something went wrong!