This morning i was thinking about another advantage of an managed OS
over a non-managed OS;
Take for example windows..
All windows applications have an event loop, and while the application
will actually sleep when it doesn't receive any events, the
application actually gets spamed with all kinds of events the
application doesn't actually care about...
So i was thinking.. with managed applications we have the advantage of
having reflection.. The OS could actually figure out which events
we're actually using..
In fact if we use the following model;

SharpOS.OnKeyUpEvent += MyOnKeyUpDelegate;

instead of the standard model;

class MyApp : SomeAppBaseClass
{
 public override void OnKeyUp()
{
...
}
}

Then it would be dead easy to determine if an application would
actually want to receive an event at all..
If we mix all this with double buffering the screen output for
applications (in a gui), then most applications will actually only
need to execute some code when you click on it (in a gui) or press a
key...
Which means in between those events the application wouldn't need to
have any timeslices from the OS.

In fact, we could tell people who would make applications for sharpos
to only register (and later unregister) events when you actually need
them..
(for example; for a drag/drop operation, register 'onmousemove' after
you press a button, and unregister it after you release the mouse
button)

What do you guys think?

Cheers

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
SharpOS-Developers mailing list
SharpOS-Developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sharpos-developers

Reply via email to