Transcript PalmOs

Palm Pilot and OS
•
•
•
•
PDA: personal digital assistant
Original: Apples Newton Message Pad 1992
Revival in 1997: Palm Pilot
Objective of Palm
– Small, Light
– Simple Functionality:
•
•
•
•
Storage of written text: address book
Calendar, To do list
Communication (email)
Synchronization with PC
Implication on Technology
•
•
•
•
•
•
•
Constant power supply from battery
No Disk
No Keyboard/Mouse
No Floppy
No Phone line or Ethernet
Single user environment
Almost single process
Example: Palm i705
•
•
•
•
•
CPU: Motorola 33 MHz Dragonball
Memory: 8MB RAM and 4MB ROM
Expansion Cards with applications
Battery: 1 week under normal use
I/O:
–
–
–
–
–
Display,
7 button on front
Pen and handwriting recognition
Infrared
Universal connector (+ cradle)
OS Requirement
• Save Power: Power Management
• Save Memory
– No Virtual memory since there is no disk
– Efficient allocation
• Input from Display support
• Security for email and other internet
applications
Power Management
• Sleep Mode
– Either after power off or after a few minutes
without input
– Display and Main clock shuts down
– Still alive: real time clock and interrupt generator
– Wake up:
•
•
•
•
Interrupt from periphery
Check battery
Start Main clock
Startup system parts
Power Management
• Doze mode
–
–
–
–
Main clock is on
LCD is on
CPU does not perform any operation
About 95% of none sleeping time
Power Management
• Running Mode
– After an interrupt the application is running as
long as it takes to process users input
– Goes back into doze right after
– Each application works from event to event
– During wait for even it is either in doze or sleep
mode
• Palm OS can go about 2 weeks for normal
use before changing AAA battery
Data Management
• Files Systems Management is too inflexible for the
small memory, moves files around
• Closer to databases than file systems
• Records (small pieces of data) are scattered over
memory
• Every application has it’s own database (collection of
records)
• Address size in Palm OS 3.X is 32 bit, word size from 8
to 32 bit
• 32 = 4G, much bigger address space than physical
• Palm OS 4 has Virtual File systems for compatibility
Process Management
• System is interrupt (event) driven
• There is no multi-process scheduling, rather batch
type (switch between one application and OS)
• Processes are only started if they received an input
event that call them
• Process runs until it is done (beware of infinite
loops) or end process event happens
• OS takes over after finish and unless there is a new
input interrupt is goes into doze mode
• Event Loop
User Interface
• Part of the OS
• No windows since display is to small for
multiple windows
• Provides Input interfaces (similar to HTML):
–
–
–
–
–
–
Scrollbars
Menus
Check boxes
Text fields
Popup lists
Command button …
• Applications create their own interfaces
Event Manager
• OS functionality that creates meaningful events out
of basic interaction on the display
• Imagine you write a letter onto the display
– Handwriting recognition is part of the OS (Graffiti)
– The coordinates of the pen stroke are transferred to the
recognition function of OS and the resulting Character
is places as an event on the event queue
– Application reads event with the correct ASCII code
Application Startup
• Application starts when user or other
application requires it
– Initialization
– Find corresponding database
• After startup application goes into “event
loop” and reads top entry from the event
queue (input events)
• Event Manager Creates events out of simple
user interaction
Communication
• Support email but no attachments
• Infrared port for data exchange between
Palm’s
• Some support cell phone functionality
• Support for integration of wide range of
third party scheduling software and operating
systems (Mac, UNIX …)
Comparison: Windows CE
– Example: Palm size PC (bigger than Palm)
– Designed for many different systems
• Creates significant overhead
• Complexity makes it harder to program
– Stable and robust on bigger devices, but problems with
memory and battery life on small
– Requires a lot of memory for OS alone
– Voice messages (require a lot of memory)
– Larger display depletes battery
• Requires a lot of battery power (less that 24h life)
– Integration only with Windows 95, 08 or NT 4
– Flash slot for memory extension (you need it)
Security of Palm
• With emails come malicious code threads
• 2000 appeared first Trojan Horse
• Originally there was no memory protection as
in UNIX or NT
• No files also means no access code
specification
• More recent versions have addressed this
• Biggest security problem: Theft and Loss
– Don’t store sensitive data on a Palm