An Introduction to the GEOS Operating System
From Pen Computing #8 February 1996
GEOS is that legendary, mythical beast - an object-oriented operating system. It is designed to run on what Geoworks calls Consumer Computing Devices (CCDs). These sound suspiciously like PDAs at first reading, but Geoworks has a broader definition than most other companies. CCDs include not only mobile computing devices, but smart telephones, office products like stand-alone word processors, and interactive television set cable boxes. There are three factors that differentiate CCDs from other computing devices:
That last item eliminates many GEOS competitors.
GEOS is written predominantly in object-oriented assembly language
for X86 CPUs. That helps satisfy Geoworks' criteria for a compact, high-performance
system. The basic OS, including the kernel, user interface, drivers and standard class
libraries, can fit in less than 2 MB. The Zoomer, which includes 18 applications, the GEOS
system software and a handwriting recognition engine fits into 4 MB ROM and 1 MB RAM, with
350K set aside for user data. On the OmniGo 100, GEOS and all the built-in applications
fit into 3 MB ROM.
GEOS is based on a single-inheritance class hierarchy. This helps keep the overall runtime footprint small. Messages that cannot be handled at the current focus of the class hierarchy are passed up the superclass tree for handling. The system also has a special type of class called a variant. Variants, which are an essential part of the GEOS user interface architecture, do not know their superclass until runtime, when the class is displayed on the screen. Their superclass may also change during program execution, providing some of the same functionality as multiple inheritance. Note that classes, not objects, can be variant.
GEOS is a pure multitasking, multithreaded operating system. Multitasking means that multiple applications can run simultaneously. For instance, you can fax and print at the same time. Multithreading means that each application can have multiple points of execution, called threads, that share the processor. For instance, a spreadsheet can have a background calculation thread and a foreground user-interface thread that intercepts taps and other forms of input. Each thread has a base priority, set by the application, and a current priority, set by the kernel.
There are two default thread models:
Additionally, an application developer can add more threads to a
program. All extra threads are categorized as either event-driven, responding to messages
places in that thread's event queue, or procedural.
GEOS provides Virtual Memory (VM) files, allowing you to treat large disk-based data stores as if they are in memory. The system automatically manages loading and unloading VM segments, writing changed segments to disk and the appropriate locking and unlocking. Like real memory, VM files can be allocated in blocks of 16 to 64K bytes.
There is a third type of memory store called local memory. Conceptually, local memory is like a mini-heap within a memory block. Local memory blocks, also called chunks, are allocated and managed just like memory in the primary heap; the difference is that using local memory is generally more efficient than using heap space. It's best suited for managing large numbers of small objects. Local memory is usually used for storing and managing the instance data for the objects in a program.
Finally, there is also a Database Item Manager for managing an
arbitrary numbers of small objects. The system works with the other memory managers to
make all access and storage transparent by providing a layer of abstraction above the
memory managers. It relies heavily on the local memory manager and is responsible for
managing the small objects in a VM file.
The graphics system includes a full set of primitive objects like lines, arcs, Bezier curves, splines, outline text, polygons, and bitmaps. Each graphics object has the primitives required to draw, reposition and rotate itself. Underlying this architecture is the notion of a path, a continuous trail that defines the outline of an object. Path operations like filling, clipping and scaling are available.
One interesting concept in the GEOS graphics system is the graphics
string. It is a collection of graphics commands that can be stored and executed later.
They can be defined as data resources in source code and include comments and parameters.
The GEOS clipboard supports the graphics string data format so that graphics commands can
be shared between tasks.
In addition, Geoworks has added some new higher-level objects to the
OmniGo version of GEOS: dynamic scrolling tables, notes that accept both text and ink
input, and a database engine that uses the same database structure found in the Hewlett
Packard LX-series handheld devices.
In order for this approach to work, a programmer doesn't specify the exact location or behavior of any of the UI objects. Instead, they must specify two types of object characteristics:
Attributes are always allocated in an object's instance data. Hints, which are only used to display objects, are added dynamically at display time if they are specified.
Using this information, the UI library decides how to implement the
visual functionality and actual placement of each UI object. In addition to simplifying
multiplatform support, this approach also simplifies program localization-if you translate
a program's strings, the UI library automatically changes their location at runtime to
compensate for modified lengths.
The GEOS input manager handles input events using three different active objects:
These three objects can be accessed directly by other objects. In
addition, any object can grab incoming events for a period of time.
In addition to these basic interface widgets, GEOS makes it easy to
add application support for multiple documents, standard file commands, the system
clipboard, and a standardized help system through the use of controller objects provided
by system objects.
Geoworks is one of the few software companies focusing exclusively on consumer-style computing electronics that sell for under $500. They've clearly staked out their territory and have a good understanding of that segment of the market. They have good technology, which is in it's third generation, and a knowledgeable set of development partners, including Sharp, Hewlett Packard and Casio.
Although Geoworks doesn't garner as much press coverage as companies
like Apple and General Magic, they seem to have a long-haul attitude that could ultimately
make them more successful than their splashier competitors. If I were looking for a PDA
technology that will be around in five years, they would be on my list of candidates.
All contents ©1995-1998 Pen
Computing Magazine, Inc. All rights reserved.
Unauthorized reproduction in any form is strictly prohibited.
Contact the Pen Computing Publishing Office for reprint information.