Top Banner
Symbian OS Presented by: Daniel O’Grady Michael O’Sullivan
29

Symbian OS - Linux Resourcesgarryowen.csisdmz.ul.ie/~cs5212/resources/oth5.pdfEKA2 –Symbian OS Kernel ¢ Symbian OS and EKA2 are modular. Functionality provided in separate blocks.

May 05, 2018

Download

Documents

vudang
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Symbian OS - Linux Resourcesgarryowen.csisdmz.ul.ie/~cs5212/resources/oth5.pdfEKA2 –Symbian OS Kernel ¢ Symbian OS and EKA2 are modular. Functionality provided in separate blocks.

Symbian OS

Presented by:Daniel O’GradyMichael O’Sullivan

Page 2: Symbian OS - Linux Resourcesgarryowen.csisdmz.ul.ie/~cs5212/resources/oth5.pdfEKA2 –Symbian OS Kernel ¢ Symbian OS and EKA2 are modular. Functionality provided in separate blocks.

History / Background

¢ Developed 10 years ago as a proprietary product.

¢ Forced by the success of Apple’s iPhone. Nokia took a large share and iPhone. Nokia took a large share and pushed for open source.

¢ Nokia/(Symbian) Ltd. & The Symbian foundation.

¢ Went open source in Feb 2010. Largest transition in IT history.

Page 3: Symbian OS - Linux Resourcesgarryowen.csisdmz.ul.ie/~cs5212/resources/oth5.pdfEKA2 –Symbian OS Kernel ¢ Symbian OS and EKA2 are modular. Functionality provided in separate blocks.

History / Background

¢ Developers can acquire and modify the OS free of charge.

¢ Single largest OS in the mobile market 47%, 330 million devices.47%, 330 million devices.

¢ Competes with the Linux based Android from Google.

Page 4: Symbian OS - Linux Resourcesgarryowen.csisdmz.ul.ie/~cs5212/resources/oth5.pdfEKA2 –Symbian OS Kernel ¢ Symbian OS and EKA2 are modular. Functionality provided in separate blocks.

The Product

¢ 3 basic principles.l the integrity and security of user data is paramount,

l user time must not be wasted, l all resources are scarce.

¢ Part of the Mobile Operating System family.

¢ Written in C++.¢ Only runs on ARM processors

Page 5: Symbian OS - Linux Resourcesgarryowen.csisdmz.ul.ie/~cs5212/resources/oth5.pdfEKA2 –Symbian OS Kernel ¢ Symbian OS and EKA2 are modular. Functionality provided in separate blocks.

The Product

¢ Featuresl Request-and-callback implementation.l Pre-emptive multitasking.l Memory protection.l Micro kernel architecture.l User Interface seperate from the engine.

Page 6: Symbian OS - Linux Resourcesgarryowen.csisdmz.ul.ie/~cs5212/resources/oth5.pdfEKA2 –Symbian OS Kernel ¢ Symbian OS and EKA2 are modular. Functionality provided in separate blocks.

The Product

l Currently on release 9.4.l Has 20 million lines of code.

¢ For use on low power battery mobile For use on low power battery mobile devices, e.g. phones & tablets.

¢ Usually flash for secondary storage, larger devices have disks.

¢ Encroaching into lower end of laptop market.

Page 7: Symbian OS - Linux Resourcesgarryowen.csisdmz.ul.ie/~cs5212/resources/oth5.pdfEKA2 –Symbian OS Kernel ¢ Symbian OS and EKA2 are modular. Functionality provided in separate blocks.

Design

¢ OO design, employing the Model-view-controller pattern.

¢ Layers from top to bottom:l UI Framework.l Application Services.l OS Services.l Base Services.l Kernel Services & Hardware Interface.

Page 8: Symbian OS - Linux Resourcesgarryowen.csisdmz.ul.ie/~cs5212/resources/oth5.pdfEKA2 –Symbian OS Kernel ¢ Symbian OS and EKA2 are modular. Functionality provided in separate blocks.

Kernel

¢ Micro Kernel, keep what is in the kernel to a minimum.

¢ Contains a scheduler, memory management and device drivers.

¢ Other Services e.g.: Networking, Telephony and Filesystem support are in the OS or Base Services layer.

Page 9: Symbian OS - Linux Resourcesgarryowen.csisdmz.ul.ie/~cs5212/resources/oth5.pdfEKA2 –Symbian OS Kernel ¢ Symbian OS and EKA2 are modular. Functionality provided in separate blocks.

Kernel

¢ Big on conserving resources eg: Symbian-specific programming idioms l descriptors and a cleanup stack.

¢ Introducing EKA2 (rel 8 & 9), a real time (nano) kernel. l Provides real time guarantees, APIs are time bound.

Page 10: Symbian OS - Linux Resourcesgarryowen.csisdmz.ul.ie/~cs5212/resources/oth5.pdfEKA2 –Symbian OS Kernel ¢ Symbian OS and EKA2 are modular. Functionality provided in separate blocks.

Kernel

¢ It uses FAT as the internal file system, an object-oriented persistence model was placed over the underlying FAT to provide a the underlying FAT to provide a POSIX-style interface.

Page 11: Symbian OS - Linux Resourcesgarryowen.csisdmz.ul.ie/~cs5212/resources/oth5.pdfEKA2 –Symbian OS Kernel ¢ Symbian OS and EKA2 are modular. Functionality provided in separate blocks.

Symbian Operating System

¢ EKA2 (EPOC Kernel Architecture 2)- The Symbian OS Kernel- Nanokernel

¢ Central Processing Unit¢ Memory Management

Page 12: Symbian OS - Linux Resourcesgarryowen.csisdmz.ul.ie/~cs5212/resources/oth5.pdfEKA2 –Symbian OS Kernel ¢ Symbian OS and EKA2 are modular. Functionality provided in separate blocks.

Symbian OS Overview

Page 13: Symbian OS - Linux Resourcesgarryowen.csisdmz.ul.ie/~cs5212/resources/oth5.pdfEKA2 –Symbian OS Kernel ¢ Symbian OS and EKA2 are modular. Functionality provided in separate blocks.

EKA2 – Symbian OS Kernel

¢ The kernel is responsible for the CPU and the memory.

¢ Has pre-emptive multithreading.¢ EKA2 is real-time. Its services are mostly bounded.bounded.

¢ Contains a "nanokernel" which provides the most basic OS facilities upon which other layers can be built.

¢ The EKA2 kernel is responsible for memory management, task management and task scheduling.

Page 14: Symbian OS - Linux Resourcesgarryowen.csisdmz.ul.ie/~cs5212/resources/oth5.pdfEKA2 –Symbian OS Kernel ¢ Symbian OS and EKA2 are modular. Functionality provided in separate blocks.

EKA2 – Symbian OS Kernel

¢ Symbian OS and EKA2 are modular. Functionality provided in separate blocks.

¢ EKA2 is single user. There is no concept of multiple logins to a Symbian OS phone.

¢ EKA2 is a priority based multi-tasking OS, ¢ EKA2 is a priority based multi-tasking OS, allocating CPU time based on a threads priority.

¢ Switches CPU time between multiple threads, giving the user of the mobile phone the impression that multiple applications are running at the same time.

Page 15: Symbian OS - Linux Resourcesgarryowen.csisdmz.ul.ie/~cs5212/resources/oth5.pdfEKA2 –Symbian OS Kernel ¢ Symbian OS and EKA2 are modular. Functionality provided in separate blocks.

EKA2 – Symbian OS Kernel

¢ Builds on the services provided by the nanokernel.

¢ Provides user-mode threads, processes, reference-counted objects and handles, reference-counted objects and handles, dynamically loaded libraries, inter-thread communication.

¢ Allows dynamic memory allocation.¢ Provides the kernel heap, which uses low-level memory services provided by an entity known as the memory model.

Page 16: Symbian OS - Linux Resourcesgarryowen.csisdmz.ul.ie/~cs5212/resources/oth5.pdfEKA2 –Symbian OS Kernel ¢ Symbian OS and EKA2 are modular. Functionality provided in separate blocks.

EKA2 – Symbian OS Kernel

¢ EKA2 has five threads, and they are: ¢ The null/idle thread. Idles the CPU, de-fragments RAM.

¢ The supervisor thread. Cleans up killed threads and processes.threads and processes.

¢ DFC thread 0. Runs DFCs for general device drivers, e.g. keyboard.

¢ DFC thread 1. Runs the nanokernel's timer queue.

¢ Timer thread. Runs Symbian OS relative and absolute timers.

Page 17: Symbian OS - Linux Resourcesgarryowen.csisdmz.ul.ie/~cs5212/resources/oth5.pdfEKA2 –Symbian OS Kernel ¢ Symbian OS and EKA2 are modular. Functionality provided in separate blocks.

Nanokernel

Page 18: Symbian OS - Linux Resourcesgarryowen.csisdmz.ul.ie/~cs5212/resources/oth5.pdfEKA2 –Symbian OS Kernel ¢ Symbian OS and EKA2 are modular. Functionality provided in separate blocks.

Nanokernel

¢ Symbian use the term nanokernel, but it is really a microkernel.

¢ Why use a nanokernel? Very low and predictable interrupt and thread latencies.predictable interrupt and thread latencies.

¢ Provides simple, supervisor-mode threads, along with their scheduling and synchronization operations.

¢ Services are more primitive than most embedded RTOSes, but enough to provide a GSM signalling stack.

Page 19: Symbian OS - Linux Resourcesgarryowen.csisdmz.ul.ie/~cs5212/resources/oth5.pdfEKA2 –Symbian OS Kernel ¢ Symbian OS and EKA2 are modular. Functionality provided in separate blocks.

Nanokernel

¢ Preemptible with interrupts enabled¢ Initial handler for all interrupts.¢ Need to prevent other threads from running in critical sections of code, such as thread in critical sections of code, such as thread state changes and access to the ready list.

¢ Critical sections are as short as possible and have bounded execution times.

¢ Critical sections are protected by disabling pre-emption, possible because these sections are very short.

Page 20: Symbian OS - Linux Resourcesgarryowen.csisdmz.ul.ie/~cs5212/resources/oth5.pdfEKA2 –Symbian OS Kernel ¢ Symbian OS and EKA2 are modular. Functionality provided in separate blocks.

Nanokernel

¢ Responsible for scheduling¢ Threads that are ready for execution are kept on a priority-ordered list.

¢ Each nanothread has an integer priority between 0 and 63 inclusive.

¢ Threads with the same priority may be executed using round-robin or FIFO scheduling algorithms.

Page 21: Symbian OS - Linux Resourcesgarryowen.csisdmz.ul.ie/~cs5212/resources/oth5.pdfEKA2 –Symbian OS Kernel ¢ Symbian OS and EKA2 are modular. Functionality provided in separate blocks.

Nanokernel

¢ What are the limitations on the nanokernel?

¢ Does not do any dynamic memory allocation, i.e. it can't allocate or free allocation, i.e. it can't allocate or free memory.

¢ In all of the nanokernel's operations, it assumes that memory has been pre-allocated by other parts of the operating system.

Page 22: Symbian OS - Linux Resourcesgarryowen.csisdmz.ul.ie/~cs5212/resources/oth5.pdfEKA2 –Symbian OS Kernel ¢ Symbian OS and EKA2 are modular. Functionality provided in separate blocks.

Central Processing Unit

Page 23: Symbian OS - Linux Resourcesgarryowen.csisdmz.ul.ie/~cs5212/resources/oth5.pdfEKA2 –Symbian OS Kernel ¢ Symbian OS and EKA2 are modular. Functionality provided in separate blocks.

Central Processing Unit

¢ Symbian OS requires a 32-bit microprocessor.

¢ It must be little endian, with a full MMU, user and supervisor/kernel modes, interrupts and exceptions.

¢ All Symbian OS phones have an ARM-based CPU, as do ~75% of the world's mobile phones.

Page 24: Symbian OS - Linux Resourcesgarryowen.csisdmz.ul.ie/~cs5212/resources/oth5.pdfEKA2 –Symbian OS Kernel ¢ Symbian OS and EKA2 are modular. Functionality provided in separate blocks.

Memory Management

¢ The kernel is responsible for: ¢ Management of the physical memory resources: RAM, MMU and caches

¢ Allocation of virtual and physical memory ¢ Allocation of virtual and physical memory ¢ Per-process address space management ¢ Process isolation and kernel memory protection

¢ The memory aspects of the software loader

Page 25: Symbian OS - Linux Resourcesgarryowen.csisdmz.ul.ie/~cs5212/resources/oth5.pdfEKA2 –Symbian OS Kernel ¢ Symbian OS and EKA2 are modular. Functionality provided in separate blocks.

Memory Management Unit

¢ Co-ordinates the use of virtual memory.¢ Sits between the CPU and the system bus, translating virtual addresses used by software into physical addresses software into physical addresses understood by the hardware.

¢ The MMU breaks up the flat contiguous physical memory into pages.

¢ Mostly pages are 4 KB, although larger 64 KB pages and 1 MB sections exist.

Page 26: Symbian OS - Linux Resourcesgarryowen.csisdmz.ul.ie/~cs5212/resources/oth5.pdfEKA2 –Symbian OS Kernel ¢ Symbian OS and EKA2 are modular. Functionality provided in separate blocks.

RAM

¢ A Symbian OS phone will have between 8 and 64 MB of RAM

¢ Quantity of RAM determines the type and number of applications you can run number of applications you can run simultaneously.

¢ Access speed of the RAM determines application performance.

¢ The OS itself has low RAM requirements.¢ Multimedia uses lots of RAM for images and video recording.

Page 27: Symbian OS - Linux Resourcesgarryowen.csisdmz.ul.ie/~cs5212/resources/oth5.pdfEKA2 –Symbian OS Kernel ¢ Symbian OS and EKA2 are modular. Functionality provided in separate blocks.

Memory Management

¢ Interrupts by peripherals go to Programmable Interrupt Controller

¢ Direct Memory Access (DMA) is used by Symbian OS, and can reduce the interrupt load by a factor of 100.

Page 28: Symbian OS - Linux Resourcesgarryowen.csisdmz.ul.ie/~cs5212/resources/oth5.pdfEKA2 –Symbian OS Kernel ¢ Symbian OS and EKA2 are modular. Functionality provided in separate blocks.

Other Stuff

¢ Viruses travel on phones via bluetooth, to date none have exploited flaws in Symbian OS.

¢ Since OS9.0 Symbian will only run software that is digitally signed.

¢ Writing apps for Symbian directly is very complicated due to the Symbian-specific programming idioms.

Page 29: Symbian OS - Linux Resourcesgarryowen.csisdmz.ul.ie/~cs5212/resources/oth5.pdfEKA2 –Symbian OS Kernel ¢ Symbian OS and EKA2 are modular. Functionality provided in separate blocks.

Other Stuff

l Use Integrated Development Environment (IDE) such as Carbide.c++ .

l The Express edition is free.l The Express edition is free.

¢ Not just Nokia also used by e.g. Siemens and Samsung.