The Symbian OS (779886), страница 15
Текст из файла (страница 15)
Symbian’s Java implementation is based around:• a virtual machine (VM) and layered support for the Java system whichcomplements it, based on the MIDP 2.0 Profile• a set of standard MIDP 2.0 Packages• an implementation of the CLDC 1.1 language, I/O, and utilitiesservices• a number of low-level plug-ins which implement the interfacebetween CLDC, the supported packages, and the native system.Java support has been included in Symbian OS from the beginning,but the early Java system was based on pJava and JavaPhone.
A standardsystem based on Java ME first appeared in Symbian OS v7.0s. SinceSymbian OS v8, the Java VM has been a port of Sun’s CLDC HI.The OS Services LayerThe OS Services layer is, in effect, the ‘middleware’ layer of SymbianOS, providing the servers, frameworks, and libraries that extend the baresystem below it into a complete operating system.The services are divided into four major blocks, by broad functionalarea:• generic operating system services• communications services• multimedia and graphics services• connectivity services.Together, these provide technology-specific but applicationindependent services in the operating system.
In particular, the followingservers are found here:• communications framework: the Comms Root Server and ESock (Sockets) Server provide the foundation for all communications services• telephony: ETel (Telephony) Server, Fax Server and the principalservers for all telephony-based services• networking: the TCP/IPv4/v6 networking stack implementation• serial communications: the C32 (Serial) Server, providing standardserial communications supportSYMBIAN OS LAYER BY LAYER55• graphics and event handling: the Window Server and Font and BitmapServer provide all screen-drawing and font support, as well as systemand application-event handling• connectivity: the Software Install Server, Remote File Server andSecure Backup Socket Server provide the foundation for connectivityservices• generic: the Task Scheduler provides scheduled task launching.Among the other important frameworks and libraries found in this layeris the Multimedia Framework (providing framework support for cameras,still- and moving-image recording, replay and manipulation, and audioplayers) and the C Standard Library, an important support library forsoftware porting.The Base Services LayerThe foundational layer of Symbian OS, the Base Services layer providesthe lowest level of user-side services.
In particular, the Base Serviceslayer includes the File Server and the User Library. The microkernelarchitecture of Symbian OS places them outside the kernel in user space.(This is in contrast to monolithic system architectures, such as both Linuxand Microsoft Windows, in which file system services and User Libraryequivalents are provided as kernel services.)Other important system frameworks provided by this layer includethe ECom Plug-in Framework, which implements the standard management interface used by all Symbian OS framework plug-ins; Store,which provides the persistence model; the Central Repository, the DBMSframework; and the Cryptography Library.The Base Services layer also includes the additional components whichare needed to create a fully functioning base port without requiring anyfurther high-level services: the Text Window Server and the Text Shell.The Kernel Services and Hardware Interface LayerThe lowest layer of Symbian OS, the Kernel Services and Hardware Interface layer contains the operating system kernel itself, and the supportingcomponents which abstract the interfaces to the underlying hardware,including logical and physical device drivers and ‘variant support’, whichimplements pre-packaged support for the standard, supported platforms(including the Emulator and reference hardware boards).In releases up to Symbian OS v8, the kernel was the EKA1 (KernelArchitecture 1) kernel, the original Symbian OS kernel.
In Symbian OS v8,the EKA2 (Kernel Architecture 2) real-time kernel shipped for the first timeas an option. (It was designated Symbian OS v8.1b; Symbian OS v8.1a is56INTRODUCTION TO THE ARCHITECTURE OF SYMBIAN OSthe Symbian OS v8.1 release with the original kernel architecture.) FromSymbian OS v9, EKA1 no longer ships and all systems are based on thereal-time EKA2 kernel.93.5 The Key Design PatternsProbably the most pervasive architectural pattern in Symbian OS is thestructuring client–server relationship between collaborating parts of thesystem. Clients wanting services request them from servers, which ownand share all system resources between their clients.Another widely used pattern is the use of asynchronous methods inclient–server communications.
Together, these two patterns impose theirshape on the system. Like any good architecture, the patterns repeat atmultiple levels of abstraction and in all corners of the system.A third pervasive pattern is the use of a framework plug-in model tostructure the internal relationships within complex parts of the system,to enable flexibility and extensibility. Flexibility in this context meansrun-time flexibility and is particularly important when resources areconstrained. The ability to load the requested functionality on demandenables more efficient use of constrained resources (objects which arenot used are not created and loaded). Extensibility is important too in abroader sense. The use of plug-ins enables the addition of behavior overa longer timescale without re-architecting or re-engineering the basicdesign.
An example is the structure of the telephony system which encapsulates generic phone concepts which are then extended, for examplefor GSM- or CDMA-specific behaviors, by extension frameworks. Theuse of plug-ins also enables licensees to limit or extend functionality byremoving or replacing plug-in implementations.At a lower level, Symbian OS makes much use of specific, localidioms. For example, active objects are the design idiom which makesasynchronicity easy and are widely used. (‘Asynchronicity’ here means theability to issue a service request without having to wait for the result beforethe thread of execution can continue.) Encapsulating asynchronicity intoactive objects is an elegant object-oriented design.
(Active objects areexamples of cooperative multitasking: multiple active objects execute ineffect within the context of a single thread. Explicit multithreading is anexample of non-cooperative multitasking, that allows pre-emption.)Symbian OS has also evolved a number of implementation patterns,including ‘leaving’ functions and the cleanup stack, descriptors for safestrings, local class and member naming conventions and the use ofmanifest constants for some basic types.9This history is described in detail in [Sales 2005], the in-depth, authoritative reference.THE KEY DESIGN PATTERNS57Symbian’s microkernel design dates back to its original conception,but becomes even more significant in the context of the new real-timekernel architecture. The real-time architecture is essential for a systemimplementing a telephony stack, which depends on critical timing issues,and is also becoming increasingly important for fast, complex multimedia functionality.
Together, phone and multimedia are arguably themost fundamental drivers for any contemporary operating system. Asmobile phones, in particular, reach new levels of multimedia capability, to become fully functional converged multimedia devices (supportingstreamed and broadcast images and sound, e.g. music streaming, two-waystreaming for video phone conferencing and interactive broadcast TV),achieving true real-time performance has become an essential requirement for a phone operating system. The real-time kernel allows SymbianOS to meet that requirement, making it a suitable candidate for directlyhosting a 3G telephony stack.The real-time kernel architecture also introduces important changes(in particular to mechanisms such as interprocess communication) tosupport the new platform security model introduced from Symbian OSv9.
(Strictly speaking, the security model is present in Symbian OS v8 butimplements a null policy. The full security model, which depends on thenew kernel architecture, is present from Symbian OS v9.)The Client–Server ModelIn Symbian OS, all system resources are managed by servers. The kernelitself is a server whose task is to manage the lowest level machineresources, CPU cycles and memory.From the kernel up, this pattern is ubiquitous.
For example, the displayis a resource managed by the Window Server; display fonts and bitmapsare managed by the Font and Bitmap Server; the data communicationshardware is managed by the Serial Server; the telephony stack andassociated hardware by the Telephony Server; and so on all the way tothe user-interface level, where the generic Uikon server (as specializedby the production GUI running on the final system) manages the GUIabstractions on behalf of application clients.Threads and ProcessesThe client–server model interacts with the process and threading modelin Symbian OS.