(Opinion request) Thoughts about IPC and services
Posted: Fri Oct 27, 2006 12:01 am
Sorry for the rambling style, I am in the manic phase of my development again.
I'd like to insert my service's ipc client stubs (elf dynamic) into the service binary (elf binary), but to do this I'd need a way to
keep them separate even in the linking phase, so that they won't interact by any means other than ipc.
My dynamic linker would then serve the application from the stub built into the service,
this way I can avoid having to match the client lib and service versions.
Ultimately my goal is a behaviour like this:
Game application wants to use DisplayDriver::drawsomething()
we normally would map this to DisplayDriver::IPCClient::drawsomething()
But if we want the maximum FPS for "The n:th Attack of the Generic Bad Guys from Outer Space 2140" (the OS might actually be ready by that year)
we could request the OS to do the following:
1. load game
2. load another copy of the DisplayDriver
3. instruct the original service to release the graphics system (save display state to memory, while (1) sleep();
4. use the entire new copy of the service as a dynamic library(relocate etc)
5. use DisplayDriver::Core::drawsomething() in place of the call to DisplayDriver::drawsomething() (the lib and the core shall be ABI compatible)
6. the game process is given direct access to the display card
Game now runs with a direct function call access to the display driver without additional IPC overhead.
Any thoughts?
I'd like to insert my service's ipc client stubs (elf dynamic) into the service binary (elf binary), but to do this I'd need a way to
keep them separate even in the linking phase, so that they won't interact by any means other than ipc.
My dynamic linker would then serve the application from the stub built into the service,
this way I can avoid having to match the client lib and service versions.
Ultimately my goal is a behaviour like this:
Game application wants to use DisplayDriver::drawsomething()
we normally would map this to DisplayDriver::IPCClient::drawsomething()
But if we want the maximum FPS for "The n:th Attack of the Generic Bad Guys from Outer Space 2140" (the OS might actually be ready by that year)
we could request the OS to do the following:
1. load game
2. load another copy of the DisplayDriver
3. instruct the original service to release the graphics system (save display state to memory, while (1) sleep();
4. use the entire new copy of the service as a dynamic library(relocate etc)
5. use DisplayDriver::Core::drawsomething() in place of the call to DisplayDriver::drawsomething() (the lib and the core shall be ABI compatible)
6. the game process is given direct access to the display card
Game now runs with a direct function call access to the display driver without additional IPC overhead.
Any thoughts?