• <xmp id="om0om">
  • <table id="om0om"><noscript id="om0om"></noscript></table>
  • System Task Manager SDK Reference  5.10
    All Classes Files Functions Variables Typedefs Enumerations Enumerator Pages
    Runtime Clients

    Runtime Clients

    A user can partition their application into multiple STM clients. Every STM client resides in a separate OS process and links to the shared library libstm runtime.so. Clients register resources and runnables with the libstm runtime.so, which creates a mapping between runnable/resource names and their process local addresses - function pointers for runnables and resource pointers (ex. CUDA streams) for resources. After the registration phase, clients then yield to libstm runtime.so by calling stmEnterScheduler(). This function enters an infinite loop that schedules a process runnables via the previously registered function pointers periodically until termination. To exit, clients can either pre-specify a maximum number of hyperepoch frames to execute as a parameter to stm master, or they can call stmExitScheduler() from within the application. For example, the application’s SIGINT or SIGTERM handler might call stmExitScheduler() to gracefully exit from the blocking stmEnterScheduler() call. STM clients follow the following initialization sequence:

    • An external entity (the init system) starts the STM Master and all clients. STM does not require that the master and clients be started in any order.
    • The STM Master will load and verify the schedule that was passed to it as a command line argument.
    • Each client will initialize and register with the STM master. They each follow the following process:
    • STM begins executing runnables according to the schedule.
    人人超碰97caoporen国产