Symbian OS Presented by: Daniel O'Grady Michael O'Sullivan

Page created by Matthew Kramer
 
CONTINUE READING
Symbian OS

Presented by:
Daniel O’Grady
Michael O’Sullivan
History / Background

¢   Developed 10 years ago as a proprietary
    product.
¢   Forced by the success of Apple’s
    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.
History / Background

¢   Developers can acquire and modify the
    OS free of charge.
¢   Single largest OS in the mobile market
    47%, 330 million devices.
¢   Competes with the Linux based Android
    from Google.
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
The Product

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

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

¢ 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.
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.
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.
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.
Kernel

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

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

¢ Memory Management
Symbian OS Overview
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.
¢   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.
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,
    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.
EKA2 – Symbian OS Kernel

¢   Builds on the services provided by the
    nanokernel.
¢   Provides user-mode threads, processes,
    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.
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.
¢   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.
Nanokernel
Nanokernel

¢   Symbian use the term nanokernel, but it is
    really a microkernel.
¢   Why use a nanokernel? Very low and
    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.
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
    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.
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.
Nanokernel

¢ What are the limitations on the
  nanokernel?
¢ Does not do any dynamic memory
  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.
Central Processing Unit
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.
Memory Management

¢   The kernel is responsible for:
¢   Management of the physical memory
    resources: RAM, MMU and caches
¢   Allocation of virtual and physical memory
¢   Per-process address space management
¢   Process isolation and kernel memory
    protection
¢   The memory aspects of the software loader
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
    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.
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
    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.
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.
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.
Other Stuff

    l Use Integrated Development
      Environment (IDE) such as
      Carbide.c++ .
    l The Express edition is free.

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