- Active objects
Active objects are a form of multitasking for computer systems. Specifically, they are a form of
cooperative multitasking . They are an important feature ofSymbian OS .In the scheme, objects may make requests of
asynchronous services (e.g. sending an SMS message). Once the request has been made, control is given to the object immediately; it may choose to do other things, or return control back to the operating system, which typically will schedule other tasks or put the machine to sleep. When making the request, the object includes a reference to itself.When the asynchronous task has completed, the
operating system will identify the thread containing the requesting active object, and wake up that thread. An "active scheduler" in that thread will identify the object that made the request, and pass control back to that object.The implementation of active objects in
Symbian OS is based around each thread having a "request semaphore". This is incremented when a thread is due to complete an asynchronous request, and decremented when the request has been completed. When there are no outstanding requests, the thread is put to sleep.In practice, there may be many objects in a thread, each doing their own task. They can interact by requesting things of each other, and of active objects in other threads. They may even request things of themselves.
Notice that this is a software implementation of a very old idea that was developed to handle software interruptions in the 70s. The operating system was acting as the first object and the peripheral as the second one.
Wikimedia Foundation. 2010.