The Symbian OS (779886), страница 40
Текст из файла (страница 40)
While atthat time there were no specific multimedia services, the bitmap-based,windowing graphics system was central, and support for various audioformats was present from the beginning.DESIGN GOALS169Service ProvidersServiceFrameworkDeviceConnectionConnectivityServicesFigure 8.5 Connectivity Services blockConnectivity was also considered a vital service from the beginning,although it was a significantly simpler service based on Symbian’s proprietary PLP protocol, a simple data transfer protocol over a physical (wired)serial port or emulated serial port over IrDA.Since then, the rapid evolution of mobile telephony through successivetechnology generations, the ubiquity of the Internet and the increasingpacketization of services, and the emergence of data exchange standardsand protocols such as SyncML have all been powerful forces in shapingthe evolution of the OS Services.
The rapid convergence of multipledevice functions with mobile phones has also had a dramatic impacton the kinds of services required from Symbian OS. Above all, multimedia technologies, which a decade ago were the province of top-endworkstations, have migrated inexorably downwards onto smaller devices;simultaneously new categories of multimedia device have been invented(digital music players and digital cameras). New technologies, includingdigital broadcast TV for mobile devices and session-based multimediaprotocols enabling two-way, real-time video and audio applications,continue to emerge and evolve.In Symbian OS, providing support for all such services falls squarelyin the realm of the OS Services layer.170THE OS SERVICES LAYER8.4 OverviewAll the core system servers, with the exception of the kernel server andthe file server, are found in the OS Services layer.• Generic OS Services:◦ The Task Scheduler provides a task-launching service for timebased and condition-based task triggers.• Multimedia and Graphics Services:◦ The Window Server provides access to screen hardware andapplication and system events.◦ The Font and Bitmap Server provides font and drawing contextsfor all bitmap-based devices.• Connectivity Services:◦ The Software Install Server provides a secure software installationinterface from remote clients.1◦ The Remote File Server provides a file system interface from remoteclients.◦ The Secure Backup Socket Server provides a backup and restoreinterface from remote clients.In addition, the essential communications servers appear in this layer(see Chapter 9):• Comms Framework and Serial Comms•Telephony•NetworkingTogether these servers provide interfaces to system-level support foralmost all the major services provided by the OS above the level ofthe kernel (persistent store and file system services are the notableexceptions).
OS Services therefore really can be thought of as the essentialinfrastructure on top of which all application-level services are built.It is also the location of Symbian OS support for many open standardsincluding:• OpenGL ES, FreeType, and graphics and audio file formats includingGIF, BMP, WAV, MP31The Remote Software Install Server is not the same as the Secure Software InstallServer; the former is used only by Connectivity Services components and manages softwareinstallation from a connected host device, typically a PC; the latter is the trusted computingbase gatekeeper installation component, see Chapter 7.GENERIC OS SERVICES BLOCK171• Cryptographic and key standards including RSA, DSA, DH, DES (notfor use by end-users)• ANSI C Standard Library, POSIX• TCP/IP v4 and v6 networking• 2G, 2.5G, and 3G telephony for GSM/UMTS and CDMA2000• Serial RS232, USB, Bluetooth, Infrared/IrDA, OBEX•FaxFrom an application perspective, many of the provided services are sufficiently specialized that few applications use them directly, or even at all.Their functions are exposed to applications through higher-level frameworks and, for example, only specialized applications explicitly use telephony or networking, although any application may use the SendAs API.However, all applications use the font services and perform eventhandling, window management, and drawing.
Whether they know it ornot, all applications depend on these core servers.From another perspective, this layer brings out many aspects of theparticular character of Symbian OS: multiple essential services are provided independently of the kernel; the client–server and framework andplug-in design patterns are ubiquitous; and object-oriented design idiomsare widespread.8.5 ArchitectureThe system model captures the broad division of responsibilities betweencomponents in the block structure of the layer. In general, each blockis structured around one or more servers that collaborate to deliver aset of related services.
Typically, servers also provide a plug-in framework, enabling extensible and flexible implementation of the underlyingservices. Frequently, the design includes multiple levels of frameworksthrough which services are implemented.As an approximation, the key interfaces to each block are encapsulatedin the principal servers and frameworks each block contains, although inmany cases there are also additional utilities exposing library interfaces.In general, each block can also be thought of as layered to form a logicalstack. The topmost layers of the stack expose the client interfaces (used byapplications and system clients); the middle layers typically interface toother system services; and the lower layers expose framework interfaces(used by device implementers to create hardware adaptation plug-ins).8.6 Generic OS Services BlockThe Generic OS Services block provides a number of general-purposeutility-style services which are useful to applications (and other system172THE OS SERVICES LAYERGeneric ServicesGeneric LibrariesGeneric OSServicesFigure 8.6 Generic OS Services blockcomponents) and some specific frameworks and libraries that provideuseful system services.The frameworks and libraries include an implementation of the CStandard Library and framework support for secure certificates, keys andtokens.
The more general-purpose utilities include logging and schedulingservices and some legacy components.Design GoalsFor the most part, the Generic OS Services are system utilities or librarieswhich have (or had in the past) some specific association with particularapplications but which have been seen as more generally useful for bothsystem and application support and so have migrated downwards in thesystem as their services have been generalized.The Event Logger and Task Manager were closely tied to the original PIM-style onboard applications, the File Logger to the telephonyimplementation (of which it was originally a component), the C StandardLibrary to Java (for which it was originally written to provide a minimal Cwrapper for system calls), and so on.
In all cases, these components havebeen part of the OS since its early releases.The Cryptographic Token Framework and Certificate and Key Management components are relatively more recent, first appearing in SymbianOS v7. Their initial appearance in the platform represented the first stepstoward providing complete and pervasive architectural support for securenetwork connections and secure browsing.
The introduction of PlatformSecurity, in Symbian OS v9, completes that process and takes it further,GENERIC OS SERVICES BLOCK173providing a complete architectural solution to the problems of security,privacy and trust.ANSI C and POSIX SupportThe C Standard Library first appeared early in the evolution of theOS and has remained largely unchanged through subsequent releases,providing a basic subset of the standard ANSI C library functions andPOSIX system calls. It is designed to make it easier to port programswritten in C or mixed C and C++ from other platforms to Symbian OS,although it does not claim to create a complete POSIX-like environmenton Symbian OS.
Instead, it supports the essential library functions, forexample malloc(), free(), printf(), and so on, that almost anyC program needs in order to run. All of stdio.h and math.h aresupported.The goal is to solve the most basic problems of porting and to enablebasic C programs to run, allowing developers to focus on porting specificprogram logic and mapping to Symbian OS native idioms. In many areas,the underlying operating system semantics (of POSIX and Symbian OS)are quite different. For example, native process and thread semantics,file semantics, console behavior, and error and signal handling are verydifferent in the two systems.The C Standard Library implementation was originally written tosupport the first Java port to Symbian OS and included the bare minimumof the library needed by Java.
(The porting problem was exacerbatedby the original licensing conditions for Java, which limited source codeavailability; providing a minimal POSIX support layer was the simplestsolution.) Since then it has been used by other system components, aswell as by third-party code, especially for porting programs originallywritten for Unix. For example, recent ports of Python rely heavily on it.2While Symbian OS v9 improves the support for ‘standard C’, there isstill no support for accessing native idioms such as active objects fromthe standard C library. In other words, the library does not attempt toprovide a complete C language interface to Symbian OS.
Thus whilePOSIX can be seen as a valuable migration tool, for complex system portsits omissions are significant. It is likely that future releases of Symbian OSwill include increasingly complete POSIX support as part of the supportfor a more standard C and C++ application platform.Secure Certificates, Keys and TokensThe Certificate and Key Management framework provides a completeframework for managing and storing security certificates and keys, andsupports certificate storage and retrieval, certificate-chain building and2Nokia provides a Python implementation for S60 through http://forum.nokia.com.Tim O’Cock’s Python for Symbian OS can be found at www.monkeyhouse.eclipse.co.uk.174THE OS SERVICES LAYERvalidation, and key operations including importing and exporting RSA,DSA and DH key pairs.
(There is no support for generating keys.) Theframework is not generally available to third-party applications, but isused by system clients (Application Installer, for example) and licenseeapplications (browsers and VPN client applications).The Cryptographic Token Framework provides the additional supportneeded to manage certificate or key-protected hardware tokens (mediacards such as SD or Memory Sticks, for example), and again is available toapplications as well as system clients.
It also provides an API for displayingsecurity-related dialogs to the user (the implementation is supplied by theuser interface).Tokens are used to store secure keys. The framework provides anabstraction based on stored keys or certificates or PIN-style key authentication, as well as finder support to identify and enumerate securemedia. Typical uses of secure tokens include DRM-protected content onphysical media or their equivalent software ‘emulations’ (for example,DRM-protected games or films), as well as downloads (for example, ofmusic).Both frameworks make use of the unified key store and unified certificate store, abstractions allowing devices to have multiple, coexisting,key and certificate store implementations and providing a single point ofaccess for clients, regardless of where an actual certificate or key resides(e.g.