0% found this document useful (0 votes)
20 views11 pages

PalmOS Swadhik

Download as pdf or txt
Download as pdf or txt
Download as pdf or txt
You are on page 1/ 11

Introduction

Since the advent of the personal desktop computer in the 1980’s personal computing has
advanced and adapted to fill new roles for consumers. One of these new roles is the
personal digital assistant. PDA’s are small computing devices that serve as personal
organizers and mobile computing platforms for several million people around the world.
The number one operating system for PDA’s is Palm OS.

Palm OS was not the first operating system for PDA’s but it was the first one to properly
address the requirements for a mobile computing device that could accommodate the
needs of the majority of its potential customers. Its central values have been efficiency,
speed, and simplicity. In its 5th iteration, Palm OS 5, the operating system has grown
larger and more complex but it has held true to its core mission and has not outpaced the
capabilities of the hardware it runs on. Its core hardware architecture, memory
management, and task management continue to support its mantra, simpler is better.

Design Requirements

The Palm Handheld is very different from desktop computers such as Windows or
Apple because the requirements and constraints of a small mobile device are very
different. Palm’s success stems from realizing this and not attempting to make Palm OS
a clone of a desktop operating system.
The first consideration for the Palm OS is screen size. Since it is obvious that
most Palm Handheld screens are small, usually 160x160 pixels, thus, is a limited amount
of information that can be displayed. While this minimalist approach borders on being
inadequate, it forces software developers to be very conservative and focused with their
user interfaces.
The second consideration is quick turnaround time. On a PC, users usually do not
mind waiting a few seconds while an application loads because they plan to use the
application for an extended amount of time. However, the average handheld user uses a
applications frequently but in short bursts, usually just a few seconds. Speed is therefore a
critical design objective for handhelds and is not limited to execution speed of the code.
The total time needed to navigate, select, and execute commands can have a big impact
on overall efficiency. Palm’s hierarchy of menus is designed to be quick and intuitive,
and many features, such as non-volatile secondary shortage, were eschewed in order to
maintain speed.
The third consideration of the design of the Palm architecture is PC connectivity.
By offloading some of the computing burden to PC such as text data entry and persistent
storage, the PDA can be kept lighter and simpler. The Palm system uses a construct
called a conduit to share data between the handheld’s application and the base station
desktop application. A conduit is a plug-in to the HotSync Technology that runs when a
person presses the HotSync button while the PDA is docked. It synchronizes data
between the application on the desktop and application on the handheld.
The fourth consideration is input method. It is clear that there is not mouse and
keyboard, which is connected to the Palm Handheld, therefore, when users enter data into
the handheld, they need to use either pen or finger. On the handheld screen, they should
either write Graffiti strokes or use the keyboard dialog. However, it is apparent that users
should not have to input a lot of data since either way of input is not as convenient as
using external keyboard or mouse. Recently, it happens that some handheld support
external keyboards, but they are still sold separately.
The fifth consideration is power. Handheld has the similar problem as notebook
on the issue of power, but Palm powered handhelds tend to run less time consuming
programs. Computationally intensive tasks can be passed off to the desktop counterpart
of a Palm program so that power is saved.
The sixth consideration is memory. Palm Handhelds have limited heap space and
storage space, and different versions of the handheld have between 512K and 8MB total
of dynamic memory and storage available. Moreover, the handheld does not have a disk
drive.
The seventh consideration is the file system. Palm OS does not use a traditional
file system because of the limited storage space, and so it can make synchronization with
the desktop computer more efficient. Data is stored in databases, which operate similarly
to paged memory. This provides a speed and cost benefit (see Memory).
The eighth consideration is backward compatibility. Through the development of
Palm Handheld, the central hardware enhancement is improvement of the processor.
Recently, Palm Handheld has changed its processor from 68K processor to ARM
processor, which its self is a type of 4-byte RISC processor. Since the newest version of
Palm OS uses ARM processor alone, its latest developed API function runs at the full
speed of the ARM processor. It causes old 68K software applications to operate in very
low speed for many software applications are not designed for ARM processors. In order
to improve the speed and solve the compatibility issues, the latest version of Palm
Handheld implement Palm Application Compatibility Environment(PACE) on ARM.
PACE allows existing 68K applications to run on the ARM processors in an emulation
mode. Many old software applications perform excellently on PACE. Therefore, these
software applications do not need to be re-written for the ARM. PACE is performed as a
compatibility layer between 68K applications and ARM processors.
The ninth and most important part of Palm Handheld consideration is program
concepts. Generally, software applications in Palm Handheld OS run in single-thread, and
normally they are event-driven programs. Only one program should run at one time.
Therefore, there are several guidelines of designation.
1. Palm programming is similar to the C/C++/Java in the way that it has PilotMain
function, which is analogous to Main function in other languages. To launch an
application, the system calls PilotMain and sends it a launch code. The launch
code may specify that the application is to become active and display its user
interface, or it may specify that the application should simply perform a small
task and exit without displaying its user interface.
2. Palm OS applications contain an event loop because of the event-driven concept.
However, this event loop is only started in response to the normal launch. Users
application may perform work outside the event loop in response to other launch
codes.
3. Generally, most Palm Handheld applications contain a user interface made up of
form, which are analogous to windows in a desktop application. The user
interface normally consists of predefined UI elements and custom UI elements.
4. In order to implement a certain feature of Palm Handheld OS functions. Palm OS
has several managers, and these mangers work in the way that integrate functions
to implement a feature.
The tenth consideration is compiling older application with the latest SDK. The rationale
of software application designation is that all Palm OS applications implemented in an
earlier version of OS should run error-free on the latest release. Therefore, there are two
ways of compiling the older application. One is to change the function name to keep
using the old API, and another way is to update the applications to use the new API.

The Palm architecture adequately addresses all of the major constraints presented by the
PDA computing problem. By utilizing minimalist solutions in most cases, the Palm
operating system has been able to aggressively meet the needs of its consumer base. This
is the major reason for its success.

Hardware Architecture

Typical architecture layers of a PDA


Overview

All Palm OS devices, including those by Handspring, HandEra, Sony, Palm Inc.,
Kyocera/QUALCOMM and Symbol Technologies, currently use the Motorola
DragonBall family of microprocessors which are based on the Motorola MC68EC000
core. The DragonBall processors are inherently low-speed, ranging from 16MHz to
33MHz depending on the type (MC68328, 'EZ328, or 'VZ328). ArvinMeritor Inc. (ARM)
Limited's microprocessor architecture, which is employed in many consumer, wireless,
and security products, will be used as the core of future Palm products and is planned to
be implemented in Palm OS devices in 2002.

Palm OS and other handheld embedded devices use battery-backed Random Access
Memory (RAM) to store application and user data. The operating system and other non-
transient components are often stored in Read-Only Memory (ROM). However, newer
devices are moving towards Flash memory for static components such as the operating
system. Flash memory is non-volatile and the data stored in it will remain intact even
with loss of battery power or a hard reset. The Palm OS is restarted from its ROM or
Flash storage area upon system reset.

CPU Speed RAM (Random Access Memory Dynamic Heap


16MHz – 33MHz 128k – 8MB 32K – 256K
Typical Ranges of Current Devices

Palm OS 5.0 – New Hardware Functionality

Multimedia Features

Palm OS 5 incorporates a set of high-density APIs that double the screen resolution of a
Palm Powered device — from 160 x 160 pixels to multiples of 160x160 pixels. These
high-density APIs are compatible with software written for a 160 x 160 screen. In
addition to these video enhancements, audio capabilities have been improved with a new
set of APIs for playing and recording 16-bit audio files. Licensees and developers can
harness these new multimedia resources to further improve the video and audio solutions
that exist on the Palm OS platform today, and to deliver the multimedia devices and
applications in the future.

Wireless Connectivity

The upcoming Palm OS 5 handhelds will be capable of connecting and communicating


with networks and other devices unlike some of its previous models. The use of Palm
Powered devices has grown far beyond personal information management (PIM) to a
position where they play a critical role in the enterprise. The ability to access information
over a wireless connection, to deliver the right information at the right time, has become
an increasingly important function for these devices.

Palm OS 5 extends the existing wireless capabilities of the Palm OS platform by


incorporating a set of APIs and drivers that support 802.11b solutions at the system level.
With the addition of these capabilities to the existing support for Bluetooth, GSM,
CDMA, and 2.5G/3G networks, Palm OS 5 offers a consistent programming interface for
wireless connectivity and an increase in processing power that improves connection
speeds significantly. Employing these new capabilities, businesses and developers are
therefore able to choose the wireless technology that suits their needs. Its capability of
multi-tasking and multi-threading allows development of peer-to-peer applications.

Security

As the most widely deployed handheld platform for the enterprise, the Palm OS continues
to deliver on the promise of providing a stable, scalable platform with a wide range of
security options. The introduction of Palm OS 5 raises the bar even higher, incorporating
a suite of robust security options without sacrificing the Palm OS tradition of flexibility,
openness, and ease of use.

Palm OS 5 offers system-wide strong encryption (128-bit) as a standard feature. Through


a partnership with RSA Security, the leading encryption provider in the security industry,
Palm OS 5 includes RC4, SHA-1, and signature verification using RSA-verify. This
partnership with RSA Security ensures that best-of-class security services are available
within Palm OS. An integral component of these security features is a plug-in
cryptographic architecture, which allows the addition of other algorithms, such as
Advanced Encryption Standard (AES), to meet specific market needs. Palm OS 5 also
offers 128-bit Secure Sockets Layer encryption services (SSL 3.0/TLS 1.0) for secure
end-to-end connections. Palm OS 5 will encompass a system-wide authentication and
authorization system that has an extensible architecture and that will allow businesses and
developers to use any of a number of methods to restrict access, including such
authentication methods as biometric verification handwriting, voice recognition,
fingerprints, and smart cards.

With these new security capabilities as a standard feature of the Palm OS 5, developers
can create applications that use system-wide encryption services to protect user data. This
will help licensees and leaders in the handheld and smart phone markets to develop
enterprise-specific devices that will meet the performance and security demands of their
customers.

Compatibility

Palm OS 5 makes these advances while protecting the ease of use, flexibility and
openness for which Palm Powered products have always been known. Despite its major
advances, Palm OS 5 will continue to be backwardly compatible with most existing Palm
OS applications. For users with advanced needs, Palm OS 5 will give a smooth growth
path into the future of mobile computing.

Memory

The Palm OS’s memory is divided into ROM and RAM on a memory card. Each Palm
device can use up to 256 cards in theory but to date all of the devices on the market only
have one card. The ROM on a card and the RAM on a card are considered to be
individual stores, of which only 2 can exist per card. A store is simply a container for an
identifier, a list of heaps, and a database directory1. Palm OS’s 3 and 4 use a 16-bit
address bus but the newly released OS 5 utilizes a 32-bit bus.

The main memory of Palm OS is divided into three logical heaps in addition to a small
block of ROM memory reserved for global variables. The three heaps are the dynamic
heap, the storage heap, and the ROM heap, in that order. Each heap is composed of a
header, master pointer table, variable size memory chunks, and a terminator. The heap
structure is replicated for each card, thus if there were two cards in the device, there
would be two dynamic heaps, two storage heaps, and two ROM heaps.

Presiding over all three memory heaps is the Palm memory manager. The memory
manager manipulates the main data structures used to organize data within memory and
provides an API for programmers to use that ensures standard memory access across
several versions of Palm OS. Developers can however circumvent the Palm memory
manager and write their own memory access & management functions (referred to as a
‘hack’) but naturally this method does not ensure compatibility across different versions
of the operating system.

Dynamic Heap

The dynamic memory heap acts as the RAM for the Palm OS. The heap contains the
operating system’s global variables and data objects, user interface components, buffers,
application data, and an application stack, which also services system functions. Here,
Palm OS is not much different from most other operating systems. The difference in the
operating system lies in how memory is allocated (see Memory Management).

ROM Heap

The ROM heap is where the actually operating system kernel is located. Its physical
address in memory is at the higher end of the address space, unlike most other operating
systems in order to make compaction of the dynamic heap faster. The ‘simple is better’
philosophy allowed the developers of Palm OS to make it small enough to run on such a
small amount of memory (between 2MB and 4MB). This is part of the reason the Palm
family devices have been able to achieve low cost, battery consumption, and size
compared to its PocketPC competition.
Storage Heap

The storage heap is where files would be stored in a PC. It is holds all of the
applications, user data, system patches, and any other persistent data in the system. The
Palm system does not store data in files in the usual sense. Instead, the Palm operating
system stores data in databases.

Memory Manager

The Palm OS Memory Manager manages memory allocation through its API. At the
physical address level of abstraction, each heap is composed of a header, master pointer
table, chunks, and a terminator. The header contains the unique heap ID, status flags, and
the heap size. The master pointer table is similar to a page table in that it keeps a list of
pointers that track where the beginnings of chunks are located within memory. The
chunks themselves are blocks of contiguous memory of variable size. A terminator is
used to indicate the end of each chunk.

Memory chunks come in two varieties, movable and fixed. ‘Handles’ are references to
reference the master pointer table, which holds the pointer to the beginning of a given
movable chunk. Pointers reference the beginnings of fixed chunks. Fixed chunks are
usually located in the higher memory addresses with movable chunks in the lower
addresses so that compaction can be performed more quickly.

To access the data in movable chunks, the handle referencing the pointer to that chunk
must first be locked. Each chunk has a lock counter that is incremented every time a lock
is placed on that chunk’s handle to a limit of 14. Every time a lock is removed the
counter is decremented. After the handle has been locked the master pointer table is
consulted for a pointer to the chunk so that the memory operation may begin. Chunks
may only be moved or resized when all locks on it have been removed (locks = 0). The
lock control system effectively helps to prevent memory access errors as well as makes it
easier for the operating system to determine which chunks are parts of the free memory.

The free memory chunks are organized in a ‘free list’ so that the fulfillment of memory
requests can proceed more quickly. Each chunk in the list holds a pointer to the next
chunk in the list. This method is used in lieu of merging adjacent free chunks to make
free memory more manageable. However, when a memory allocation request fails, the
operating system automatically performs memory compaction in order to organize free
memory chunks into bigger blocks. If the memory allocation error was caused by too
much memory being used it will not be solved by compaction. In this event the operating
system will continue to re-attempt to compact and system performance will begin a spiral
of degradation unless the user reduces their demand on memory. This is one cause for
system crashes.
Palm OS 5

The Palm OS version 5 is a major departure from the older Palm operating
systems. The difference is so great that an extra interpreter, Called Palm Compatibility
Environment (PACE), was needed to provide backwards compatibility for OS 4 and
earlier. The PACE is able to provide a simulated OS 4 environment while improving
performance over the same operations running under a true OS 4 environment. This is
possible because the new OS runs on a significantly improved processor, as described
earlier.

Threads and Processes

From its AXM Kernel roots the Palm OS 5 has inherited a simple method of
process scheduling. The kernel uses Preemptive Priority scheduling to determine which
process gets the processor. What this means is that each process is assigned a priority
number. At the end of every CPU cycle, the process scheduler checks to see if the process
currently running has the highest priority of all processes in the ready queue. If the
currently running process does not have the highest priority then the process is suspended
from the processor and the process with the higher priority that is next its queue is given
the processor. In this way processor time is allocated.

Multithreading is a major feature on this newest of Palm OS’s. The Palm OS 5 has a
unique implementation of Multithreading; it does not apply to most applications available
for the OS. Currently and for the foreseeable future Palmsource Inc has barred third party
applications from spawning new threads. The only applications that may incorporate
multithreading are those that are written by Palmsource Inc as system programs. The
reasoning for this restriction lies in Palmsource's licensing agreement with Kodak, the
maker of the AXM Kernel from which the new OS is derived.

The agreement with Kodak prohibits Palmsource from releasing the Application
Program Interface (API) for multithreading functions to the public. An example of a
program that is permitted to use these functions is the HotSync program. This program
uses two threads, one for user-interface, and the other for communication with a PC. The
use of this method enables the HotSync program to run more efficiently on the Palm OS
5.

It is also important to note that Multitasking in this OS is very limited. Only one process
that uses the User Interface is allowed to be running at one time. If a user desires to
switch programs the OS must request that the currently running process terminate itself
before the new process can run. According to the developer documentation available on
the Palmsource website, there is no way for the OS software to terminate a process
abnormally to free up the user interface for use.
Conclusion

The Palm OS is a very elegant solution to the computing design problems


presented by the Personal Digital Assistant. Almost every component of the OS
addresses these problems in some way shape or form. While there are many
compromises the result has been an unqualified success.
With the release of Palm OS 5, there has been a great leap forward in handheld
computing. The changes to the operating system are almost revolutionary. The future
brings with it great expectations. Palmsource Inc has already promised an all-new Palm
OS within the next year or two. The name for the new OS has not been announced as of
yet. Also bringing great possibilities to the world of handheld computing is the new
PocketPC OS, from Microsoft. This OS will likely bring up competition and drive even
greater products out of Palm in the future.

Reference

https://www.cs.cornell.edu/courses/cs614/1999sp/papers/palmos.pdf

https://en.wikipedia.org/wiki/Palm_OS

https://www.oreilly.com/library/view/palm-os-programming/1565928563/ch06.html

https://www.fuw.edu.pl/~michalj/palmos/Memory.html

http://www.cs.cornell.edu/courses/cs614/1999sp/notes99/adrianb.html

You might also like