Multithreading in Scriptcase

Multithreading in Scriptcase

Aiming to increase the performance when generating the source code of the project’s applications in Scriptcase, it was implemented the possibility to use more than one processor core (more than one thread) simultaneously, ie, instead of generating the source code of only one application at a time we can set how many processors core will be used.

Multithreading is a very popular programming model that allows the execution of multiple line of execution within a single context, multiple actions to be performed sharing resources and process independently. The “Line of Command” programming model provides the developer a simultaneous execution. However, it is way more interesting when it is used in a simple process allowing a parallel execution on multi-processor systems.

Model Many-To-One
The many-to-one model maps many user level threads to processor cores. The threads management is done in user requariment, but the whole process will be blocked. Moreover, since only one thread can access the processor at a time, multiple threads are unable to run in parallel multiprocessor.

Model One-To-One
The one-to-one model maps each user thread for a single core processor, generates more competition than the many-to-one model. It allows another thread to run while a thread performs a blocking system call. It also allows multiple threads to execute in parallel on multiprocessors. The only disadvantage of this model is that creating a user thread requires creating the corresponding processing thread.

Model Many-To-Many
The many-to-many model multiplexes many user-level threads to a smaller or equal to the processor cores. The number of processor threads can either be specific to a particular application as for a particular machine. Developers can create as many user threads as necessary, and the corresponding processor threads can run in parallel on a multiprocessor. Furthermore, when a thread performs a blocking system call, the processor can schedule another thread for execution.

The threads configuration on Scriptcase can be found in Options > Settings. The “Quantity of compilations in parallel” by default is set to 5 and may vary from 1 to 100. The other option is there if we will “Display the compile-time of the applications individually” or collectively for all applications.





Below is a screenshot of the new functionality in operation.




    • Related Articles

    • Request license for new installation

      Note: Before performing any action on your Scriptcase, we recommend you to do a backup of your projects. In some cases, it is necessary to register the Scriptcase again, as in formatting or change of the server, for example. In these cases, it will ...
    • Scriptcase customization

      Scriptcase provides some resources for customizing the tool. These features are available in the settings menu, currently there are two customization options: My Scriptcase - In this option you can configure the general settings of the tool with the ...
    • Parallel Installation of Scriptcase

      Never delete the directory where you installed your Scriptcase The procedures in this tutorial, explain only how to install the Scriptcase manually. We recommend to create a backup of your scriptcase before proceeding the update, in Options->Settings ...
    • Enabling hotkeys on Scriptcase

      Scriptcase has shortcut keys for various features within the tool. The use of shortcut keys makes it easier to manipulate the tool, making access to features more intuitive and quick. To enable hotkeys, go to the top menu Options -> My Scriptcase. On ...
    • Hotkeys on Scriptcase

      Scriptcase offers the ability to create shortcuts for the application functionalities. The configuration of each shortcut is simple and the same for all browsers. However the way of use is different, each browser is different, and this is independent ...
    • Popular Articles

    • Examples for diagrams

      This tutorial shows how you can import and use the new examples for diagrams released with Scriptpcase V9.2.16.  The applications were created using the components: Jsmind, JKanban e Orgchart.  - Sample 1: Mind Map diagram Click here to  execute the ...
    • Oracle Connection - Scriptcase 9 - Linux 64 Bits

      This procedure will only work if you have a Scriptcase manual installation in your server. Installing PHP 7.0 Installing the Scriptcase Manually To connect with Oracle in a Linux System, we must follow these steps below: Step 1 -  Installing these ...
    • Using friendly URL

      The friendly URL was included from Scriptcase 7, in order to make the URL, of the applications generated by Scriptcase, cleaner and easier to associate them with applications. For example, using friendly URLs the link to a Scriptcase application ...
    • Correcting access error for the Scriptcase database

      Sometimes we encounter an error accessing the Scriptcase database itself, as shown in the image below:   This problem happens when we change the folder name of the scriptcase to another name, such as "sc". Then, the error happens because the complete ...
    • Necessary libraries to install the Scriptcase in Windows 7

      To install Windows 7 SP1, you need to verify that the system has the following items installed: * Visual C ++ Redistributable Packages for Visual Studio (2008) x86 and x64. * Visual C ++ Redistributable Packages for Visual Studio (2010) x86 and x64. ...