WHAT IS CYBERNETIC THREAD CONTROL ?
In cybernetic thread control, the objective is to control the flow of the threads with a cybernetic management system. A cybernetic software management system can be considered as a typical application of software cybernetics. The software cybernetics is a relatively new research area and it investigates how software behavior can be controlled with the help of the theoretical foundation of the control systems engineering. In control system theory, a dynamical system is a system in which its output depends on not only its current inputs but also its previous inputs. Similarly, in a cybernetic management system, the control decisions must be given based on not only current status but also previous status of each component effecting software behavior. Therefore, cybernetic thread management system is constructed with a project specific database holding an optimally allocated memory area.
In classical multi threading, the scheduling of the threads are determined by the underlying hardware and the operating systems. Therefore, in classical multi threading the threads interleave randomly. In other words, in classical multi threading, the code sections are executed in a random order and the interaction between the threads are non deterministic. Actually, this is the reason why multi-threaded application development is difficult for the software developers who have not deep knowledge on concurrent programming. In below figure, the difference between non deterministic and deterministic scheduling has been illustrating.
Figure: Nondeterministic and deterministic schedulling
In figure-a, non deterministic scheduling of the code sections has been illustrated. In the figure-a, the numbers S1, S2 and SN illustrated different scheduling scenarios. The numbers represent the execution order of the code sections. In each scheduling scenario, the execution order of the code sections differs and the code sections are executed non-deterministically. On the contrary, in the figure-b, deterministic execution of the threads has been illustrated and there is only one possible execution scenario exists. From this point of view, it can be said that the code sections which are illustrated on figure-b are executed just as single threaded software applications.
From this point of view, it can be said that the code sections which are illustrated on figure-b are executed just as single threaded software applications. However, this behavior is not preferred on multi threading. Because, internal non-determinism ( the concurrent executions of the threads ) is essential to harness the power of parallel chips and internal determinism may lead performance degradation in multithreading. However, in order to make parallel programs easy to understand and debug, we need to make them behave like sequential programs. Cybernetic thread control offers a balance between internal determinism and in cybernetic thread control, only the critical sections which effects the determinism of the software are executed in an exactly same order in each running of the threads.
In cybernetic thread control, the thread control system receives information from both the software developer and the process itself. This information is hold in particular data structure including status data about every software component effecting the flow of the threads. In cybernetic thread control, the main objective is to control the flow of the threads based on the software developer’s directives. In other words, the cybernetic thread control system forces the flow of the threads to the software developer objectives without leading a significant lose on the computing performance.