1 Answers

An active object framework is a callback-based form of multitasking for computer systems. Specifically, it is a form of cooperative multitasking and is an important feature of the Symbian operating system.

Within the framework, active objects may make requests of asynchronous services. When an asynchronous request is made, control is returned to the calling object immediately. The caller may choose to do other things before it returns control back to the operating system, which typically schedules other tasks or puts the machine to sleep. When it makes the request, the calling object includes a reference to itself.

When the asynchronous task completes, the operating system identifies the thread containing the requesting active object, and wakes it up. An "active scheduler" in the thread identifies the object that made the request, and passes control back to that object.

The implementation of active objects in Symbian is based around each thread having a "request semaphore". This is incremented when a thread makes an asynchronous request, and decremented when the request is completed. When there are no outstanding requests, the thread is put to sleep.

4 views