THE INNOVATION ON THE PCYNLITX PLATFORM
First of all, the pcynlitx platform offers a new programming paradigm which can be named as the programmable meta-programming technology. You can find out more information about the programmable meta-programming systems on the programming tutorial. You can read a brief introduction of the project from the link given in below.
On the site of multithreading, the innovation is deterministic multithreading. The biggest problem on the current multi-thread software development process is non-deterministic scheduling of the threads. The execution order and the priority of the threads reflect the term of scheduling. More specifically, scheduling is a decision about which thread will run and which thread will be suspended in a particular time interval. Unfourtunatelly, on the current systems, the execution order of the threads are determined by the operating system and on the each run of the program, the threads and code sections are executed with different order. This stuation breaks down input-output determinisim of the multi-thread applications and thus, developing, debugging and testing multi-thread applications much more difficult.
On the contrary, with pcynlitx, you can directly determine the execution order of the threads independently from the operating system. Moreover, you can directly determine which code section will be executed in which order. By this way, pcynlitx totally solves the problems that are caused by the non-determinitic scheduling of the threads. Therefore, with pcynlitx, developing and testing of a multithread software is much more easy. The term scheduling and why deterministic scheduling is necessary will be clarified with the explanations given in the following sections.
INTRODUCTION TO PCYNLITX PROJECT
Pcynlitx is an outcome of a scientific research study that is carried out by Erkam Murat Bozkurt who is a research engineer in Istanbul / Turkey. For more information about the developer of the platform, please look the developer section of the web site. Pcynlitx platform has been developed based on a new idea. This idea is to develop a software that can write codes in a collaboration with its user. By this way, Pcynlitx acts as a separate intelligent actor simplifying the multi-threaded software development process. Basically, pcynlitx is a code generator which can be programmed by the programmer. More specifically, It receives the requirements of the software to be developed from the programmer by means of a descriptor file and then, writes a C++ class library ( a thread library ).
Figure: How pcynlitx platform collects information from the user.
In practice, the programmers enter their preferences to the graphical user interface of the pcynlitx by means of some menus and pcynlitx builds the descriptor file automatically. Now, let we start to investigate why we need such a mechanism. In order to do that, at first, we need to understand what is the thread. If you don't know already what the multi-threading is basically and why it is necessary, please look the link given in below.
THE NATURE OF MULTI-THREAD PROGRAMMING
Unfortunately, the structure of a multi-threaded program may differs according to the requirements of the application to be developed. For each application, the answer of the questions given in below may change.
Which thread function will be executed by which thread ?
Will be there a communication between the threads?
Will the threads share a common memory or variable?
How many thread will be activated on the process ?
This structural diversity increases the gab between the control functions that are used for thread management and the operating system that executes the threads. However, pcynlitx follows a very different way.
THE PHILOSOPHY OF THE PCYNLITX
Pcynlitx collects information about the context of the program from its user and produce an application specific thread management library. Then, the programmer of the pcynlitx writes the program codes using a threading library which is specialized for a particular application. Thanks to its collective programming approach, pcynlitx platform establishes an autonomous thread management system organizing the execution of the threads according to its user directives.
Figure: A sample illustration for the usage of the pcynlitx
In order to learn why application specific thread library construction is necessary, please look the page named as "Why pcynlitx is necessary" on the documentation menu or click the link given in in below as "Why application specific library construction is necessary?".
WHAT IS THE PROBLEM ON THE STANDARD THREADING LIBRARIES ?
On the single threaded applications, there is only one flow of execution and procedures are executed one by one. Therefore, single threaded applications has input-output determinism. More specifically, on the single threaded applications, each code line is executed in an exactly same order and the output of the program never changes. However, on the contrary, different runs of a multi-threaded program may show different behaviors depending on how the threads interleave and in fact, the biggest problem on thread programming is non-deterministic scheduling of the threads ( The therm of scheduling has been clarified in the next section given in below ). This situation breaks down the input-output determinism of the multi-threaded applications and it plays a crucial role on the deadlocks as well. Unfortunately, standard threading libraries such as C++ threads does not offer any solution to this problem.
WHAT IS THE SCHEDULING OF THE THREADS ?
The execution order and the priority of the threads reflect the term of scheduling. More specifically, it is a decision about which thread will run and which thread will be suspended in a particular time interval. In practice, the operating system schedules the threads. In other words, the programmer can not control the scheduling of the threads on the applications in which a standard multi-threading library such as C++ threads is used. Lets take a look the figure that is given in below.
Figure: A sample illustration for the execution order of the threads
Let we look at the figure.
Which code block is executed first ? Can the programmer determine this?
For the standard threading libraries, the answer is no !
On the standard threading libraries, the programmer can not determine exactly which code block will be executed in which order. However, in Pcynlitx, the programmer can determine how the threads interleave. This power of the Pcynlitx comes from the “application specific multi-threading library” construction process. The term “application specific multi-threading library” refers such a library that has written for a specific application. In other words, on the library, there are some special tools which are generated for a certain class or application and the library is constructed based on some application specific information such as how many thread will be created in run-time and what will the name of the thread functions be.
HOW PCYNLITX DIFFERS FROM THE OTHER TOOLS ?
With Pcynlitx, you will have a threading library that is specialized according to your needs. The control tools that are build by the Pcynlitx has a memory and can receive information from the process. In other words, the control tools of the Pcynlitx communicate the process after each operation that is performed on the process. This communication can be considered as a feedback mechanism which provides situation awareness. Therefore, you can give a unique number for each thread and you can control the threads by means of these unique numbers. More specifically, you can stop and rescue each threads with its unique numbers. This property provides more control over the threads. For instance, let we look at the illustrative program depicted in the below figure.
Figure: How Pcynlitx controls the threads
In the figure, the function call depicted as “wait ( 1, 2 )” stops “thread-1.” The same function call also records that the “thread-1” will be rescued by the “thread-2” later on. This means that the pcynlitx also defines the relation between the threads and reduces non-determinism of the multi-threading. In the program, “thread-1” always waits on the code line in which wait(1,2) function call is performed until its corresponding rescue function is called by “thread-2” . Therefore, the “Code Block -2” is always executed before the “Code Block -1”. More specifically, the programmer can determine exactly which thread will be blocked by which thread and how and in which place the threads will be rescued later on. Standard threading libraries don’t have such a control over the threads and thanks to the autonomous thread management system, Pcynlitx has many other advance properties which the other threading libraries doesn't have. In order to learn how pcynlitx produces an application specific library and how provides such a control over the threads, please look the following link.
You can visit the source code repository
WHAT IS PCYNLITX
- First of all, Pcynlitx is not a multi-threading library. In fact, Pcydlitx is a multi-threading library generator ( or we can simply say that it is a multi-threading api generator ).
- More specifically, Pcynlitx produces a multi-threading library which is specialized according to your needs. If you want to learn more, please read the informations that are given in that page.
THERMS OF USE
- An application to the US Copyright office has been performed for the modified version of the source code of the project
- A certificate of registiration has been received from US Copyright office for the source code of the project
- A certificate of registiration has been received from the copyright office of Turkey
- More control on threads : Give a certain number to each thread and control it with that numbers.
- Autonom thread management : on each operation, thread management tools record the numbers of the threads and provide the execution of the threads according to programmer’s directives.
- Easy to use : there is no need to learn any new coding style. It is only C++.
- Coding Simplicity : Pcynlitx makes abstraction to C++ threads and many operation are performed on the inside of the library constructed by
- Strong Documentation : You can find out many tutorial and technical documents on the web site
- Deterministic Multi Threading : Pcynlitx provides input-output determinisim
THE PROPERTIES OF PCYNLITX
- Code editing : You can use pcynlitx as a code editor. However, it is more than a code editor. Pcynlitx interracts with its user and it is a part of software development process.
- The interraction with the user : You can enter your preferences to the pcynlitx by means of its menus. In each step of software development process, pcynlitx asists the programmers
- Directory Tree View : You can search over the directories by means of the directory tree view option.
- Project management : You can build and manage your multi-thread application directly with pcynlitx.
- Special Library Construction : You can build your multi-threading library according to your reqirements
- Compiler : Pcynlitx uses gcc compiler as its compiler tool chain and wxWidgets as its graphical user interface toolkit.
- License : GNU GPLv3
- Introductory documents and tutorials has been updated ( You can download from both official web site and repository ).
- A new article has been published on ISO C++ web page