CarLinO Processes Manager and Performance Monitoring
All
CarLinO applications and standard Linux application that use CarLinO_wrapper class, must be registered to CarLinO_core using classes CarLinO_process / CarLinO_leash.
The CarLinO_core class has a pool of CarLinO_process classes to receive application register requests and to manage the processes. Every
CarLinO native applications must istantiate a class (app_leash), derived from CarLinO_leash, to implement the comunication protocol with CarLinO_core.
During this registration the application sends to
CarLinO core a structure called CarLinO_process_attr with informations about:
- Process memory requirement
- Process CPU usage requirement
- CarLinO resource requests (number of child threads, number of child processes, graphic objects, ...)
CarLinO_process will use this informations to control the process behavior and performances.
| |
CarLinO_core | | Application
| |
_________________| _______________ |___________
| | Register CarLinO app | | Inehrit | |
| CarLinO_process | <---------------------- | CarLinO_leash | . . . . . | app_leash |
| | | | | |
| | messages / alerts | control | | |
| | ------------------------|---------------|---------> | ---. |
| | | | | | | |
| | | action | | action |
| | response | | | | | |
| | <-----------------------|---------------|---------- | <---' |
|_________________| |_______________| |___________|
| |
| |
| |
During normal operations, CarLinO_process send messages periodically to monitor and to control the processes behavior. This messages are:
- PING message for keepalive check
- Warning message for policy changing
- Control message to modify the process's behavior
The app_leash class must act and responding properly at all PING/warning messages to avoid control action from CarLinO. CarLinO use a black list to put into the disobedient processes and it will apply policies to tame they.
The messages send from CarLinO_process class to CarLinO_leash and his derived class (called my_leash in the follow) are:
- CarlinoMsgPing: my_leash have to responde with CarlinoMsgPong
- ... work in progress ...
This messages are received in the Dispach method of CarLinO_leash classe. This method is a pure virtual method and have to be implemented in the derived class of CarLinO_leash. A CarLinO native application have to use this class to allow the CarLinO_core managing. If it doesn't do it CarLinO_core could discared this application.
- Todo:
- CarLinO_process / CarLinO_leash messages exchange
- CarLinO_core process policies: black list