Windows
ARCHITECTURE
The structure of WINDOWS is a layered design that
Has two main components, user mode and kernel mode. It is a preemptive operating system, which has been designed to work with uniprocessor and symmetrical multi processor based computers. To process input/output (I/O) requests, they make use of packet-driven I/O, which utilizes I/O request packets (IRPs) and asynchronous I/O.
User mode is made up of subsystems that ha ability of passing I/O requests to the suitable kernel mode device drivers by utilizing the I/O manager. Kernel mode has full controls hardware and system resources. The kernel mode prevents user mode services and applications from controlling critical areas of the operating system that they should not have access to.
This does not have a pure microkernel architecture microkernel architecture. Windows consists of separate modules . Each system function is controlled only by one component of the OS .any of the module can be removed, upgraded, or replaced without rewriting standard APIs.
The components of kernel are
‘ Executive: Includes the base operating system services, like memory management, process, thread management, security, I/O, and inter process communication.
‘ Kernel: Contains the most used fundamental parts of the operating system. It controls thread scheduling, process switching, exception and interrupt handling, and multiprocessor synchronization. kernel's own code do not run in threads. Hence, it is the only component that is not preemptible or pageable.
‘ Hardware abstraction layer (HAL): Maps between hardware commands and responses unique to a specific platform. It separates the OS from platform specific hardware differences.
‘ Device drivers: Includes file system and hardware device drivers .
‘ Windowing and graphics system: Carry out the graphical user interface functions.
‘ I/O manager: Supports a framework through which I/O devices are approachable to applications, and accountable for sending them to the appropriate device drivers
‘ Cache manager: Enhances the performance of file based I/O.
‘ Object manager: Creates, manages, and deletes Windows Executive objects and abstract data types.
‘ Power manager: Synchronizes power management among many devices.
‘ Security reference monitor: Strengthens access validation and audit generation rules.
‘ Virtual memory manager: Maps virtual addresses to physical pages in the computer's memory.
‘ thread manager: Creates and deletes objects and tracks process and thread objects.
User-Mode Processes
There are 4 basic types of user-mode processes are:
‘ Special system support processes: Contains services not provided by Windows operating system like logon process and the session manager.
‘ Service processes: Other Windows services like the event logger.
‘ Environment subsystems.
‘ User applications
Threads and SMP
Two important features of Windows are its support for threads and symmetric
multiprocessing
‘ OS routines can be executed on any processor, and different routines can
run at the same time on different processors.
‘ Windows supports the use of multiple threads of execution within a single process.
Multiple threads within the same process may run on different processors
at the same time.
‘ Server processes may use multiple threads to process requests from more than one client
at the same time.
Multithreading
Windows supports concurrency among processes because threads in different processes may
run concurrently. multiple threads within the same task may be allocated to
different processors and run at the same time. A multithreaded process achieves concurrency
without the overhead of using multiple processes. Threads within the same process can exchange
information through their common address space and have access to the shared resources of the
process. An object-oriented multithreaded process is an efficient means of implementing a server application.
Thread States
An existing Windows thread is in one of six states
‘ Ready: May be scheduled for execution. The microkernel dispatcher keeps track of all
ready threads and schedules them in priority order.
‘ Standby: A standby thread has been selected to run next on a particular processor. The
thread waits in this state until that processor is made available. If the standby thread's
priority is high enough, the running thread on that processor may be preempted in favor of
the standby thread. Otherwise, the standby thread waits until the running thread blocks or
exhausts its time slice.
‘ Running: Once the microkernel performs a thread or process switch, the standby thread
enters the running state and begins execution and continues execution until it is preempted,
exhausts its time slice, blocks, or terminates. In the first two cases, it goes back to the ready
state.
‘ Waiting: A thread enters the waiting state when (1) it is blocked on an event, (2)
it voluntarily waits for synchronization purposes, or (3) an environment subsystem directs
the thread to suspend itself. When the waiting condition is satisfied, the thread moves to the
Ready state if all of its resources are available.
‘ Transition: A thread enters this state after waiting if it is ready to run but the resources are
not available. For example, the thread's stack may be paged out of memory. When the
resources are available, the thread goes to the Ready state.
‘ Terminated: A thread can be terminated by itself, by another thread, or when its parent
process terminates. Once housekeeping chores are completed, the thread is removed from
the system, or it may be retained by the executive1 for future reinitialization.
WINDOWS CONCURRENCY MECHANISMS
The two most important methods of synchronization are synchronization objects and critical
section objects. Synchronization objects make use of wait functions.
Wait Functions
These functions allow a thread to block its own execution. These functions do not return
till the particular criteria is met. When this function is called, it first checks whether the given criteria is met or not. If its not met, the calling thread enters the wait state.
The WaitForSingleObject function needs to handle one synchronization object. It returns when one of the following situation occurs:
‘ Particular specified object is in the signaled state.
‘ Time out interval elapses.
The process used by Windows to execute synchronization facilities is by using
synchronization objects, which are listed in figure.
The first 4 object types are particularly created to support synchronization.
The other object types have different uses and may also be used for synchronization.
Each synchronization object may be in either a signaled or unsignaled state.
WINDOWS MEMORY MANAGEMENT
Windows Virtual Address Map
Windows user process has a separate 32-bit address space, providing 4 Gbytes of memory
per process.A part of this memory is kept for the operating system, hence each
user has 2 Gbyte of available virtual address space.We can increase user space by 3 Gbytes,
leaving 1 Gbyte for system space. This feature is to support large memory applications.
.’ 0x00000000 to 0x0000FFFF: to help programmers catch NULL-pointer
assignments.
‘ 0x00010000 to 0x7FFEFFFF: Available user address space.
‘ 0x7FFF0000 to 0x7FFFFFFF: A guard page inaccessible to the user.
‘ 0x80000000 to 0xFFFFFFFF: System address space.
Windows Paging
When a process is created, it can make use of the entire user space of 2 Gbytes. This space is again divided into fixed-size pages, any of which can be brought into main memory.
A page can be in one of three states:
‘ Available: Pages which are not currently used by this process.
‘ Reserved: A set of pages the virtual memory manager reserves for a process.
‘ Committed: Pages for which the virtual memory manager has preserved space in its paging File.
WINDOWS SCHEDULING
Windows implements a preemptive scheduler with a flexible system of priority levels that includes round-robin scheduling within each level and, for some levels, dynamic priority variation on the basis of their current thread activity.
Multiprocessor Scheduling
When Windows is run on a single processor, the highest-priority thread is always active unless it
is waiting on an event. If there is more than one thread that has the highest priority, then the
processor is shared, round robin, among all the threads at that priority level. In a multiprocessor
system with N processors, the (N ‘ 1) highest priority threads are always active, running
exclusively on the (N ‘ 1) extra processors. The remaining, lower-priority, threads share the
single remaining processor. For example, if there are three processors, the two highest-priority
threads run on two processors, while all remaining threads run on the remaining processor.
WINDOWS I/O
Basic I/O Modules
The I/O manager consists of four modules:
‘ Cache manager: The cache manager handles caching for the entire I/O subsystem.
Cache manager includes two services to improve overall performance:
‘Lazy write: The system records updates in the cache only and not on disk. Later, when
demand on the processor is low, the cache manager writes the changes to disk. If a
particular cache block is updated in the meantime, there is a net savings.
‘Lazy commit: This is similar to lazy write for transaction processing. Instead of
immediately marking a transaction as successfully completed, the system caches the
committed information and later writes it to the file system log by a background process.
‘ File system drivers: The I/O manager treats a file system driver as just another device
driver and routes message for certain volumes to the appropriate software driver for that
device adapter.
‘ Network drivers: Windows includes integrated networking capabilities and support for
distributed applications.
‘ Hardware device drivers: These drivers access the hardware registers of the peripheral
devices through entry points in Windows Executive dynamic link libraries.
WINDOWS FILE SYSTEM
Windows supports a number of file systems, including the file allocation table (FAT) that runs
Windows also designed a new file system, the Windows File System (NTFS), that is intended to meet high-end requirements for workstations and servers.
Key Features of NTFS
NTFS is a flexible and powerful file system built, as which shall see, on an elegantly simple file
system model. The most noteworthy features of NTFS include:
‘ Recoverability
‘ Security
‘ Large disks and large files
‘ Multiple data streams
‘ General indexing facility
WINDOWS SECURITY
Windows provides a uniform access control facility that applies to processes, threads, files,
semaphores, windows, and other objects. Access control is governed by two entities: an access
token associated with each process and a security descriptor associated with each object for
which interprocess access is possible.
Access Control Scheme
When a user logs on to an Windows system, Windows uses a name/password scheme to
authenticate the user. If the logon is accepted, a process is created for the user and an access
token is associated with that process object. The access token, whose details are described later,
include a security ID (SID), which is the identifier by which this user is known to the system for
purposes of security.
The access token serves two purposes:
1. It keeps all necessary security information together to speed access validation. When any
process associated with a user attempts access, the security subsystem can make use of
the token associated with that process to determine the user's access privileges.
2. It allows each process to modify its security characteristics in limited ways without
affecting other processes running on behalf of the user.
Access Token
‘ Security ID: Identifies a user uniquely across all of the machines on the network. This
generally corresponds to a user's logon name.
‘ Group SIDs: A list of the groups to which this user belongs.
‘ Privileges: A list of security-sensitive system services that this user may call.
‘ Default owner: If this process creates another object, this field specifies who is the owner
of the new object.
‘ Default ACL: This is an initial list of protections applied to the objects that the user
creates.
LINUX
Linux is the most used version of UNIX. Being an open source its source code is freely available
and is free to use. It was designed taking into account of its UNIX compatibility. Its functionality list is quite same as that of UNIX.
Components of Linux System
Linux Operating System has three components
Kernel ‘ is the core part of Linux OS and is accountable for all major activities.
System Library ‘ These are unique programs by which application programs can retrieve Kernel's properties.
System Utility ‘ These programs are accountable for accomplishing specialized, individual level jobs.
Kernel Mode vs User Mode
Kernel component code runs in a unique granted mode called kernel mode with full control to all resources of the PC. This code represents an individuale process, runs in individual address space and do not want any context switch and hence is very productive and speedy. User programs and other system programs works in User Mode which has no control to system hardware and kernel code. User programs/ utilities use System libraries to access Kernel functions to get system's low level tasks.
Basic Features
Portable ‘ means software can work on various types of hardware in exact way.
Open Source ‘ its source code is freely available
Multi-User ‘ many users can access system resources like memory/ ram/ application programs at the same time.
Multiprogramming ‘ many applications can execute at same time.
Hierarchical File System ‘ it supports a standard file structure
Shell ‘ It is a special interpreter program which can be used to run commands of the OS.
Security ‘ It supports user security using authentication features like password protection/ controlled access .
Architecture
The following illustration shows the architecture of a Linux system ‘
The architecture of a Linux System consists of the following layers ‘
Hardware layer
Kernel
Shell
LINUX PROCESS AND THREAD MANAGEMENT
Linux Tasks
A process in Linux is showed by a task_struct data structure.
‘ State: The execution state of the process
‘ Scheduling information
‘ Identifiers
‘ Interprocess communication
‘ File system
‘ Address space
‘ Processor-specific context
Figure 4.18 shows the execution states of a process. These are:
‘ Running: A Running process is either executing or it is ready to execute.
‘ Interruptible: This is a blocked state, in which the process is waiting for an event, such as
the end of an I/O operation, the availability of a resource, or a signal from another process.
‘ Uninterruptible: This is another blocked state.
‘ Stopped: The process has been halted and can only resume by positive action from another
process.
‘ Zombie: The process has been terminated but, for some reason, still must have its task
structure in the process table.
Semaphores
At the user level, it supports a semaphore interface.
Internally, Linux supports an implementation of semaphores for its own. That is, code that is
part of the kernel can invoke kernel semaphores. These kernel semaphores cannot be accessed
directly by the user program via system calls. They are implemented as functions within the
kernel and are thus more efficient than user-visible semaphores.
Linux provides three types of semaphore facilities in the kernel: binary semaphores,
counting semaphores, and reader-writer semaphores.
LINUX MEMORY MANAGEMENT
Linux shares many of the characteristics of the memory management schemes of other UNIX
implementations but has its own unique features. Overall, the Linux memory-management
scheme is quite complex
The two main aspects of Linux memory management are process virtual memory, and kernel memory allocation.
Linux Virtual Memory
Virtual Memory Addressing
Linux makes use of a three-level page table structure, consisting of the following types of
tables
‘ Page directory: An active process has a single page directory that is the size of one page.
Each entry in the page directory points to one page of the page middle directory. The page
directory must be in main memory for an active process.
‘ Page middle directory: The page middle directory may span multiple pages. Each entry in
the page middle directory points to one page in the page table.
‘ Page table: The page table may also span multiple pages. Each page table entry refers to
one virtual page of the process.
LINUX SCHEDULING
The three Linux scheduling classes are:
‘ SCHED_FIFO: First-in-first-out real-time threads
‘ SCHED_RR: Round-robin real-time threads
‘ SCHED_OTHER: Other, non-real-time threads
LINUX VIRTUAL FILE SYSTEM
Linux has a flexible and strong file handling feature, designed to provide a wide variety
of file management systems and file structures. The approach taken in Linux is to make use of a
virtual file system (VFS), which presents a single, uniform file system interface to user
processes. The VFS has a common file model that is capable of expressing any conceivable
file system's general characterstic and demeanor. The VFS presumes that files are objects in a computer's
mass storage memory that share basic properties regardless of the target file system or the
underlying processor hardware. Files have symbolic names that allow them to be uniquely
identified within a specific directory within the file system. A file has an owner, protection
against unauthorized access or modification, and a variety of other properties. A file may be
created, read from, written to, or deleted. For any specific file system, a mapping module is
needed to transform the characteristics of the real file system to the characteristics expected by
the virtual file system.
Security
In linux in order to make changes and download things we need to enter admins’s password.Hence it is difficult for malice programs to gain access to your system.Codes can also be changed to make it more protective.
iOS
iOS which was known as iPhone OS is a mobile OS manufactured and distributed by Apple Inc.. It is the default operating system for the iPhone, the iTouch and the iPad. The iPhone OS was derived from Mac OX X
iOS Architecture
Hardware: In iPhone, Hardware points to the physical chips soldered to the iPhone’s circuit.
Firmware: It refers the chip-specific code that is either present with memory in or around the peripheral itself, or within the drive.
Processor: The iphone Os sets up the arm instruction set and ARM instruction set during boot and driver initialization that is referred as processor.
iPhone OS It is composed of kernel, drivers, and services.
Objective-C Runtimes: It is made up of the Objective-C dynamically-linked runtime libraries and the underlying C libraries.
Frameworks/API: This layer consists of API calls which are Apple-distributed headers with the iPhone
SDK, with some dynamic linking occurring at runtime.
Memory Management
For dynamic memory management iOS supports Reference counting method. Here each object keeps the count of how many other objects are using it and when the count reaches zero the object is deallocated and the memory is released. If the memory is less, all the presently running apps in the iOS will get warning message indicating low memory in order to set free any memory that it is not being presently used. If the low memory condition exists, then the system will terminate all the apps . There is no garbage collector in iPhone, therefore in order to prevent the program from leaking the memory, the developer must clean the variables after using them.
Thread Management
A thread has a single way of execution.In iPhone OS, each application is composed of one or more threads. An applications begins with a single thread, which executes the application's main function. The applications can have extra threads which runs a specific function. When a new thread is created, it will becomes an independent thing inside the process space. A thread has its own execution stack and the kernel schedules its run time separately. As threads are in the same process space, they can communicate with other threads and processes. All threads in a single application share the same virtual memory space and have the same access rights as the process itself. Each thread requires the memory allocation in both the kernel memory space and the program memory space. The core structures needed to manage the thread and coordinate its scheduling. The stack space of thread and the per-thread data is stored in program's memory space. When first create the thread, the most of structures are created and initialized. In order to creating the low-level thread, a function or method to act as the main entry point for thread is needed, then one of the available thread routines has to be used to start the thread. The thread can be created by using the different methods as using NSThread, POSIX Threads, or using NSObjec to spawn a thread. After a thread is created, different thread environment needed to be configured, like configuring the stack size of a thread and the thread-local storage, setting the detached state of a thread and the thread priority.
Interrupts
Most device drivers never need to take primary interrupts because their interrupt lines don’t cascade into the system’s interrupt controller. For example, FireWire and USB devices have a notion of interrupts, but are really just messages on a serial bus. These are commonly referred to as software interrupts because apart from the interrupt caused by the message itself, the interrupt is entirely simulated in software.
Inter-process communication
For iPhone, any time the sequence in which two operations are completed affects the result, there is the potential for a race condition. For example, if two processes share the same global variable, then there is the potential for one process to interfere with the other or
for an attacker to alter the variable after one process sets it but before the other reads it. The solution to race conditions of this type is to use some locking mechanism to prevent one process from changing a variable until another is finished with it. There are problems and hazards associated with such mechanisms, and they must be implemented carefully.
Security and Privacy
The features of iOS helps to protect personal information by automatically encrypting the e-mail messages and third party applications using passcode. iOS provides privacy by blocking cookies and prevent websites from tracking. The iOS 7.0.6 addresses vulnerability at the time of handling encrypted communications which allows intercepting, reading or modifying encrypted email, web browsing, tweets and other transmitted data. The applications which are developed to use in iOS must be approved by Apple before being made available via marketplace and also iOS does not provide Adobe Flash support .
ANDROID
Android is not only a mobile operating system that uses a modified version of the Linux kernel
but also a software stack for mobile devices that includes an operating system, middleware and key applications.
Architecture
Thread management
When the first of an application's components needs to be run, Android starts UI thread, a Linux process for it with a single thread of execution. The UI thread, which also know as main thread is automatically created when an Android application is started. UI thread is very important because it takes in charge of dispatching the event to the appropriate widgets. UI thread also the thread people interact with the Android widgets. When people touches a button, the UI thread will dispatches the touch event to the widget which in turn sets its pressed state and posts an invalidate request to the event queue. It dequeues the request and notifies the widget to redraw itself. By default, all components of the application run in that process and thread. Each component is run by a process, and the component elements have a process attribute which specify the process where the component should run. By setting bthe attributes in different way, it is easy to know whether the component run in its own process or share a process with other components. No component should perform long operation when called by the system in order not to block other components which also in the process. Besides, when the memory is low and other processes have more immediately requirement, the Android will decide to shut down a process. The application components running in that process will be destroyed consequently. Therefore, android weights the importance of each thread to the user to decide the victim. Android provides Handler and Looper to manage threads and let them communicate with each other. Looper is used for running a message loop within a thread, headler is processing the messages and HandlerThread is setting up a thread with a message loop. After a child thread create an image from the web, it notifies the UI thread by sending a message using the handler that's bound to UI thread's message queue. The data produced by the child process can also send via the message. Therefore, the UI thread can update with the data produced by the child thread. When a Handler is created, it is bound to the message queue of the thread that created it.
Interrupt
In Android, signal is a blocking I/O operation has been interrupted. The number of bytes that were transferred successfully before the interruption took place is stored in a field of the exception. Lock implementations provide more extensive locking operations than can be obtained using synchronized methods and statements. They allow more flexible structuring, may have quite different properties, and may support multiple associated Condition objects. As interruption generally implies cancellation, and checks for interruption are often infrequent, an implementation can favor responding to an interrupt over normal method return. This is true even if it can be shown that the interrupt occurred after another action may have unblocked the thread. An implementation should document this behavior.
Inter-process communication
In Android’s computing, the Inter-process communication (IPC) is a set of techniques for the exchange of data among multiple threads in one or more processes. Processes may be running on one or more computers connected by a network. IPC techniques are divided into methods for message passing, synchronization, shared memory, and remote procedure calls (RPC). The method of IPC used may vary based on the bandwidth and latency of communication between the threads, and the type of data being communicated.
System calls
Developer can trace the system calls invoked by Android for specific tasks by Android Task. The developer have to figure out which process is actually managing the data items, and then use strace <app name> after start to strace an application. It can also attach to an existing process by using the command 'strace -p <pid>'. Use 'ps' to find the process which is managing the contacts and messaging.
Memory management
Android applications usually are limited to 16 MB of heap. Though it is very little for some developers, it is a lot of memory for a phone. Because the more applications Android can keep in memory, the faster it will be when user switch between its applications. Therefore, the applications should use as little memory as possible to guarantee multiple applications run without getting killed. The memory leak phenomenon affects the memory usage, and hence affects the application switch efficiency. All Android apps are written in Java. Java, unlike other programming languages, does not require any coding to allocate or deallocate memory and handles all memory allocation/deallocation through a "feature" called automatic garbage collection. The garbage collector kicks in whenever an application no longer has any active threads pointing to it. By design, the garbage collector will not remove applications that are actively being used; but there may be a bit of system degradation while things are being cleaned up .Android rely on automatic memory management which handled by garbage collector. However, the garbage collector can sometimes cause performance issues if memory allocation is not handled carefully. The Android SDK provides allocation tracker, a tool to avoid the frequent garbage collection.
Security
Android is a multi-process system, in which each application (and parts of the system) runs in its own process. Most security between applications and the system is enforced at the process level through standard Linux facilities, such as user and group IDs that are assigned to applications. Additional finergrained security features are provided through a "permission" mechanism that enforces restrictions on the specific operations that a particular process can perform, and per-URI permissions for granting ad-hoc access to specific pieces of data. As an open platform, Android allows users to load software from any developer onto a device. As with a home PC, the user must be aware of who is providing the software they are downloading and must decide whether they want to grant the application the capabilities it requests. This decision can be informed by the user's judgment of the software developer's trustworthiness, and where the software came from.
Virtualization
Every Android application runs in its own process, with its own instance of the Dalvik virtual machine. Dalvik has been written so that a device can run multiple VMs efficiently. The Dalvik VM executes files in the Dalvik Executable (.dex) format which is optimized for minimal memory footprint. The VM is registerbased, and runs classes compiled by a Java language compiler that have been transformed into the .dex format by the included "dx" tool. The Dalvik VM relies on the Linux kernel for underlying functionality such as threading and low-level memory management. Unlike most virtual machines and true Jave VMs which are stack machine, the Dalvik VM is a register-based architecture. Like the CISC vs. RISC debate, the relative merits of stack machine vs. register-based approaches is a subject of continual argument.
Generally, stack-based machines must use instructions to load data on the stack and manipulate that data, thus, require more instructions than register machines to implement the same high level code, but the instructions in a register machine must encode the source and destination registers and, therefore, tend to be larger. This difference is primarily of importance to VM interpreters for whom opcode dispatch tends to be expensive and other factors are relevant for JIT compliation.
BLACKBERRY OS
This operating system is developed by Research In Motion for its BlackBerry line of smartphone hand held devices. It provides multitasking & supports specialized input devices that have been adopted by RIM for use in its handhelds especially the trackballs, trackwheel, trackpad and touchscreens. This operating system is designed only in C++ and it supports many languages like US English,UK English, French, etc.
The BlackBerry OS has a Java based kernel, and utilizes an ARM architecture with an Intel XScale processor. ARM is a Reduced Instruction Set Computer15 (RISC) type with instruction set architecture16 (ISA). It uses 16 x 32-bit registers, 1 processor status register and a load/store architecture ARM does not manufacture its own CPU chips, but licenses it to other manufacturers to integrate them into their own system. The latest series of BlackBerry phones (the 9000 series) uses a XScale microprocessor.This processor utilizes an open source bootstrap firmware called RedBoot or (Red Hat Embedded Debug and Bootstrap), designed for embedded systems.
Interrupt
A feature of the ARM architecture is to allow designers to make the decision between performance and latency tradeoffs. For example, instructions that would normally run to completion can be made interruptible where low latency is a priority. This is particularly useful in the case of mobile phones or other telecommunication devices, which run on embedded systems that require low latency to perform adequately.
Memory Management
The BlackBerry Java Virtual Machine (JVM) manages memory usage on the BlackBerry device. The BlackBerry JVM allocates memory, performs garbage collection17, and automatically swaps data between SRAM and flash memory. The BlackBerry JVM must also share available memory between the BlackBerry device applications and the BlackBerry Java Application. The memory capabilities represent the total amount of available memory, which is larger than the available working memory when all of the applications and associated application data exist on the BlackBerry device. Garbage collection is performed at three levels: (RAM garbage collection, Full garbage collection and Idle garbage collection)
RAM garbage collection of the BlackBerry Java Virtual Machine initiates a RAM garbage collection operation only when the BlackBerry JVM cannot allocate an object because of a lack of space in RAM. The RAM garbage collection operation typically takes 500 to 600 milliseconds to execute. The garbage collection operation removes any freshly allocated variables that are no longer referenced in RAM. To make sure that the lack of a reference in RAM is a sufficient condition for removing the object, a RAM garbage collection operation can only be performed when objects have not been paged out to flash memory.
Full garbage collection operation executes for 1 second on average and should take less than 2 seconds to complete.
Idle garbage collection does not occur every time that the BlackBerry device idle; it occurs only when the system considers a garbage collection operation to be beneficial for optimal system performance and maximized battery performance.
Access to memory: The BlackBerry Java Development Environment is designed to inhibit applications from causing problems accidentally or maliciously in other applications or on the BlackBerry device. BlackBerry applications can write only to the BlackBerry device memory that the BlackBerry Java Virtual Machine uses; they cannot access the virtual memory or the persistent storage of other applications .
Multitasking
The BlackBerry OS provides multitasking and supports specialized input devices that have been adopted to Research in Motion (RIM) for use in its Smartphones including trackweel, trackball, trackpad and touch screen. BlackBerry is primarily a messaging phone which consists of the largest number of messaging features in a Smartphone. The blackberry platform is renowned for its native support for corporate e-mail and allows complete wireless activation and synchronization with Microsoft Exchange, Lotus or Novell e-mail, calendar, tasks, notes ‘etc. . It can thus run more than one application at a time. For example: while making a call, you can switch to the calendar or contacts application. These applications run in the background while carrying out current task. However, the more applications that are running, the more memory the device uses. Third-party developers can write software using the available BlackBerry API classes, although applications that make use of certain functionality must be digitally signed.
Security
Historically, the security has been a central point of BlackBerry OS, but on the other hand the present security characteristics are adapted towards the use in endeavor surroundings. When someone uses the BlackBerry Enterprise server then all communication among the mobile phone and external world is encrypted, and the network administrator can add or remove the applications at all as well as change policies that manage, what the user and application can do. Encrypt the all user data on the device is a possible policy. The applications that are used by the JVM are accessible by the BlackBerry OS, access to determine data or virtual memory from other applications is not possible if not access has been specially granted. With these capabilities application potentially may be risky and have to be digitally signed by RIM. This situation is also true for many other APIs that have been labeled as perceptive so that a review experiment is offered when mistreatment of these APIs is noticed.
Symbian
The historical background of Symbian is in the EPOC operating system for the Psion family of PDAs. From the commercial point of view, Symbian is strongly linked to Nokia, which used the Symbian OS for the majority of its Smartphones [61]. Originally the Symbian Company was formed by a group of manufacturers including Nokia, Ericsson and Motorola. Later Samsung and Sony Ericsson joined the Symbian Company. In 2008 Nokia bought Symbian Ltd. and created the Symbian Foundation to migrate the Symbian operating system to open source [28]. In February 2011, Nokia and Microsoft announced new partnership plans. The new strategy includes Windows Phone serving as Nokia's primary Smartphone platform.
Concurrency Control
Symbian operating system is multithreaded like other operating system for mobile devices. This ability is also allowed to the third party developers of applications to make possible to run the processes in the background. Unlike all types of applications have access to such APIs; it is not a problem for C++ developers. Symbian OS kernel has the facility of hard real time operating system tasks but on the other hand it does not support real time scheduling for the user processes.
Memory
Use Symbian OS was designed for mobile device with limited resources. Since the out of memory errors may happen any time at the time of memory allocation, to remove these errors and make the program able to go back to a stable and acceptable stat when error occur. In order to make this acceptable Symbian OS is implemented with cleanup stack and leaves. Symbian OS has not the ability to handle exceptions like standard C++, but on the other hand it supplies its own idioms. When an exception or leave occurs, objects that are allocated in the heap would not cleanup dynamically. In order to solve these issue sources of memory leak pointers to all objects that are created should be stored on the cleanup stack. This technique allows the system to cleanup unused objects dynamically
Threads Management
Symbian operating system has a lightweight thread known as the active object. Active objects are specialized threads that have some unique characteristics including the following:
‘ Each active object is specifically focused on an event that causes a thread or process to block a function; such lockable functions include communication and device I/O. Each active object works with a single active scheduler that listens for events for which the object is waiting. All active objects within a process use the same scheduler; different schedulers can be used between processes. An active object defines a specific entry point in its code that is used by the active scheduler when an event is generated. The entry point is represented by a standard function call that is defined for each active object. When waiting for an event, all active objects within a single process are maintained by the same scheduler. Hence, they act as a single thread to the system. Accordingly, active objects in a single process can be coordinated by a single scheduler implemented in a single thread. Active objects form an efficient and lightweight version of standard threads by combining code into one thread that would otherwise be implemented as multiple threads, building fixed entry points into the code and by using a single scheduler to coordinate their execution.
System Calls
The Symbian kernel EKA2 is multi-threaded, thus allowing the preemption of low-priority kernel operations by high-priority ones
Interrupts
Programs never link directly to the Symbian OS kernel, but interface to it through a shared library known as the user library. This library contains the necessary instructions to interface to the OS and request its service programs, calls the user library functions, which are preprogrammed to cause a software interrupt; It is the only mechanism for a program to interface outside it’s process. It is to be mentioned that Executive Calls are the user library calls that allow a user thread to enter a processor privileged mode so that it can access, in a controlled and prede’ned way, the hardware resources or kernel space objects or services. What are called Executive Calls for Symbian OS are known as System Calls for some other types of OS. All Executive Calls are implemented in terms of the SWI instruction
Networking
Symbian OS offers limited set of services in order to connect the wireless network. It can detect for Wi-Fi networks retrieve information or data about the cellular network that is being connected. Symbian OS has also offers limited functionality of Bluetooth. It is possible in only one condition the devices that securely connected to each other for Bluetooth I/O. It means that the user input is required before communication among the paired devices. However, this is not a specific problem of Symbian OS. When a connection occurs, the developer has full control over thew transmitted data. Symbian OS sockets are similar to the BSD sockets and it is possible to specify the interface that must be used. New devices are based on Symbian OS platform in order to support open C and C++ and low level socket API is a port of this standard.
Security
Symbian operating system has various features like other mobile device operating systems for the purpose of protection and privacy. The harmful threat is managed by the Symbian OS security architecture is the distribution of malicious applications. This threat is managed by requiring the program to be signed before there installation. Once they installed then access to the resources is restricted. Since application are reviewed before the risk of installing malware is minimized signed by them, but it is not good because there are number of ways for user to obtain the running unsigned applications. In this regard the Symbian OS is similar to the iPhone OS where applications that are divided using the application store are reviewed first by Apple and after Jailbreak this limitation can be circumvented. Symbian offers developers with numerous APIs in order to implement the security features. By default in Symbian OS Cryptographic, hashing and random number generating algorithm are available.