Presentation is loading. Please wait.

Presentation is loading. Please wait.

An Overview of Palm OS n Designed for special hardware –small screen ( 160 x 160 ) –less processing power than desktop PCs –quick turnaround expected –limited.

Similar presentations


Presentation on theme: "An Overview of Palm OS n Designed for special hardware –small screen ( 160 x 160 ) –less processing power than desktop PCs –quick turnaround expected –limited."— Presentation transcript:

1 An Overview of Palm OS n 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 n Motorola 68328 uses 32-bit addresses n External data bus is only 16 bits wide n ROM - stores the main suite of applications ( the OS itself) n RAM - stores additional and replacement applications & system extensions n RAM - dynamic RAM & storage RAM

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

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

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

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

9 Movable / Nonmovable Chunks n Each chunk is referenced by a local ID n The local ID of a nonmovable chunk : the offset of the chunk from the base address of the card n 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 n 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 n Master pointer table stores 32-bit pointer to movable chunks n Movable chunks are allocated at the beginning Heap Header Movable chunks Non-movable chunks Heap Master pointer table

12 Chunk Structure n Each chunk begins with an 8-byte header followed by that chunk’s data n Flags:sizeAdj flag: –high nibble : set for free chunk –low nibble : reqSize = size - 8 - [this value] n 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.) n Lock:owner byte –high nibble : the lock count, which is incremented when being locked –low nibble : the owner ID of the memory chunk n hOffset field( 3 bytes) –the distance from the master pointer to the chunk header, divided by two

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

15 The Resource Manager n Resources : store the UI elements of an application, such as images, fonts, dialog layouts, … n 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 n Single threaded n Event-driven n PilotMain() corresponds to main() in C n PilotMain -- Response to launch codes n An event loop in response of a normal launch

17 Flowchart of event handling

18 Developing Apps on Palm n 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 n The Palm OS provides a good platform for developing Palm apps n The Palm OS provides various libraries for communicating with PC’s n 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 卓聖堯


Download ppt "An Overview of Palm OS n Designed for special hardware –small screen ( 160 x 160 ) –less processing power than desktop PCs –quick turnaround expected –limited."

Similar presentations


Ads by Google