[haiku-development] Re: graphics server

  • From: Joseph Groover <looncraz@xxxxxxxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Thu, 08 Dec 2011 22:44:08 -0600


In any case, I am with Clemens on this one. There shouldn't be a separate process. At some point, you have to deal with a crashing component and have to reconnect the clients to the server. It makes no difference what you reconnect to what, so you may as well implement reconnecting applications to the app_server (and registrar while you're at it). I don't even think it would be very hard.


My idea was to implement a kernel-served server application type with its own resource management policies. The idea would be that critical servers would have a dedicated kernel connection with which critical skeleton data can be stored by the server so critical servers could be restarted at will in addition to tracking any kernel-side aborts that may need to be made (such as interrupts, memory allocations, etc...).

Critical system server failures (app_server and input_server mostly) would be caught and the server given a re-launch to attempt rescue, then be launched in a fail-safe mode to attempt rescue. A server could also implement a special-purpose recovery mode, so that the, possibly corrupt, data structures and connections could be manually re-built - but that would be limited to the app_server, really - in the future...

When a new graphics driver is installed, the app_server could quickly suspend connections, the kernel would suspend all connected threads correctly, and the app_server would shut itself down. The kernel would then re-launch the app_server in a controlled-manner, keeping the data structures as read-only until the app_server gives a server resume message to signify successful launch. If it fails, the graphics driver could then possibly be rolled-back to the previous version with an extra chance to resurrect the server state before falling back to fail-safe.

I'd rather the kernel take up the task rather than having a watcher daemon, just seems cleaner...

Time to resume the old "uptime wars!"

--The loon

Other related posts: