An Overview of Palm OS - PowerPoint PPT Presentation

1 / 20
About This Presentation
Title:

An Overview of Palm OS

Description:

Data manager allocates memory in the storage heap. Memory Heaps. Each heap has a unique heap ID ... compacting heaps when they become fragmented. Heap Structure ... – PowerPoint PPT presentation

Number of Views:47
Avg rating:3.0/5.0
Slides: 21
Provided by: csieN
Category:
Tags: heap | overview | palm

less

Transcript and Presenter's Notes

Title: An Overview of Palm OS


1
An Overview of Palm OS
  • Designed for special hardware
  • small screen ( 160 x 160 )
  • less processing power than desktop PCs
  • quick turnaround expected
  • limited memory ( 512k 8MB )
  • no disk drive or PCMCIA disk

2
The Appearance of a PalmPilot
3
System Architecture
4
Memory Orgnization
  • Motorola 68328 uses 32-bit addresses
  • External data bus is only 16 bits wide
  • ROM - stores the main suite of applications ( the
    OS itself)
  • RAM - stores additional and replacement
    applications system extensions
  • RAM - dynamic RAM storage RAM

5
Dynamic RAM
  • Served as temporary space for allocation
  • Analogous to the RAM installed in a typical
    desktop system
  • Is cleaned after reboot
  • Implement a single heap that provides memory for
    dynamic allocations( TCP/IP, IrDA, )

6
Storage RAM
  • Holds nonvolatile user data ( appointments, to do
    lists, memos, address lists, )
  • Is accessed via calling the database manager or
    the resource manager
  • Analogous to the disk drive of a typical desktop
    system

7
Memory Chunks and Heaps
  • A chunk - contiguous memory between 1byte 64 KB
    that has been allocated by the Palm OS memory
    manager
  • Each chunk resides in a heap
  • Memory manager allocates memory in the dynamic
    heap
  • Data manager allocates memory in the storage heap

8
Memory Heaps
  • Each heap has a unique heap ID
  • The heap with heap ID 0 is the dynamic heap
  • Only the dynamic heap is reinitialized through
    soft reset cycles

9
Movable / Nonmovable Chunks
  • Each chunk is referenced by a local ID
  • The local ID of a nonmovable chunk the offset
    of the chunk from the base address of the card
  • The local ID of a movable chunk the offset of
    the master pointer to the chunk from the base
    address of the card

10
The Memory Manager
  • The functions of the memory manager
  • allocating new chunks
  • disposing of chunks
  • resizing of chunks
  • locking and unlocking chunks
  • compacting heaps when they become fragmented

11
Heap Structure
Heap
  • Master pointer table stores 32-bit pointer to
    movable chunks
  • Movable chunks are allocated at the beginning

Heap Header
Master pointer table
Movable chunks
Non-movable chunks
12
Chunk Structure
  • Each chunk begins with an 8-byte header followed
    by that chunks data
  • FlagssizeAdj flag
  • high nibble set for free chunk
  • low nibble reqSize size - 8 - this value
  • size field( 3 bytes)
  • the size of the chunk, which is larger than the
    size requested by the application , including the
    chunk header itself

13
Chunk Structure(cont.)
  • Lockowner byte
  • high nibble the lock count, which is
    incremented when being locked
  • low nibble the owner ID of the memory chunk
  • hOffset field( 3 bytes)
  • the distance from the master pointer to the chunk
    header, divided by two

14
The Data Manager
  • The database is analogous to disk
  • A database is a collection of records
  • A record is mapped to a memory chunk
  • A database accesses its records by storing their
    local IDs
  • An application requests a particular record in a
    database by index

15
The Resource Manager
  • Resources store the UI elements of an
    application, such as images, fonts, dialog
    layouts,
  • Resource manager Data manager with the
    additional ability of tagging each chunk of data
    with a unique resource type and resource ID

16
Application Structure
  • Single threaded
  • Event-driven
  • PilotMain() corresponds to main() in C
  • PilotMain -- Response to launch codes
  • An event loop in response of a normal launch

17
Flowchart of event handling
18
Developing Apps on Palm
  • Various development tools
  • Code Warrior for Palm OS
  • Palm SDK (header files, documents, examples)
  • GCC
  • POSE - An open source Palm emulator runs on
    Windows, Mac and UNIX

19
Conclusion
  • The Palm OS provides a good platform for
    developing Palm apps
  • The Palm OS provides various libraries for
    communicating with PCs
  • A good OS design is not necessarily having the
    most advanced feature, but having the best
    integration of the hardware

20
The End
  • B86506053 ???
  • B86506025 ???
Write a Comment
User Comments (0)
About PowerShow.com