Saturday, March 18, 2017

Digest for comp.programming.threads@googlegroups.com - 16 updates in 13 topics

Ramine <toto@toto.net>: Mar 17 07:57PM -0400

Hello....
 
 
Here is how to understand C++ compilers..
 
I have written this, read it carefully:
 
====
C++ compilers today follow a weak memory model and this is error prone
when you want to reason about sequential consistency when doing parallel
programming.
 
But Delphi and FreePascal compilers don't reorder loads and stores,
so it is less error prone than C++ on a strong memory model of x86
architecture and on strong memory model of ARM architecture.
 
This is why i am using Delphi and Freepascal Dynamic Link Libraries
from C++ compilers.
===
 
 
Now you have understood the philosophy of C and C++ compilers,
it's that they give much more priviledge to speed than to security, they
look like assembler compilers in this regard, this is why they follow a
weak memory model that is more error prone than Delphi and FreePascal
compilers.
 
 
Thank you,
Amine Moulay Ramdane.
Ramine <toto@toto.net>: Mar 17 07:37PM -0400

Hello....
 
 
C++ compilers today follow a weak memory model and this is error prone
when you want to reason about sequential consistency when doing parallel
programming.
 
But Delphi and FreePascal compilers don't reorder loads and stores,
so it is less error prone than C++ on a strong memory model of x86
architecture and on strong memory model of ARM architecture.
 
This is why i am using Delphi and Freepascal Dynamic Link Libraries
from C++ compilers.
 
 
Thank you,
Amine Moulay Ramdane.
Ramine <toto@toto.net>: Mar 17 07:34PM -0400

Hello.....
 
 
C++ compilers today follow a weak memory model and this is error prone
when you want to reason about sequential consistency when doing parallel
programming.
 
But Delphi and FreePascal compilers don't reorder loads and stores,
so it os less error prone than C++ on a strong memory model of x86
architecture and on strong memory model of ARM architecture.
 
This is why i am using Delphi and Freepascal Dynamic Link Libraries
from C++ compilers.
 
 
Thank you,
Amine Moulay Ramdane.
Ramine <toto@toto.net>: Mar 17 07:12PM -0400

Hello....
 
Another deficiency of C++ compilers..
 
When you compile your projects you have to include the static libraries
in the makefile for example, but in Delphi and FreePascal you don't need
to because they will link them automaticaly for you.
 
Delphi and FreePascal compilers are newer than C++ compilers,
but C++ compilers have inherited deficiencies of the past.
 
 
Thank you,
Amine Moulay Ramdane.
Ramine <toto@toto.net>: Mar 17 07:00PM -0400

Hello....
 
 
I have noticed that C++ compilers have inherited deficiencies of the
past, because you can not change the memory manager easily and
efficiently, but in Delphi and FreePascal it is easy to do it.
 
Look at my nedmalloc interfaces for Delphi and Delphi XE versions and
FreePascal:
 
https://sites.google.com/site/aminer68/nedmalloc-interfaces-for-delphi-and-delphi-xe-versions-and-freepascal
 
 
It's easy to install this scalable memory manager in Delphi and
FreePascal compilers and it's efficient to install it, but in C++
compilers it's not.
 
 
Thank you,
Amine Moulay Ramdane.
Ramine <toto@toto.net>: Mar 17 06:45PM -0400

Hello......
 
About C++ and Object Pascal..
 
I have programmed with Object Pascal(with Delphi and FreePacal
compilers) since 1996, and what i have found that Object Pascal is more
beautiful language than C++ and it's powerful, this is why i love to
program in Delphi or FreePascal, but i have learned fast C++ and i have
found that C++ is good also because i was already an experienced
programmer, also i have noticed that when you compile a header in C++
and you don't use all your functions from the header, C++ compiler will
not compile all the header, Delphi and Freepascal are better because
when you compile a unit they will compile all the unit.
 
 
Thank you,
Amine Moulay Ramdane.
Ramine <toto@toto.net>: Mar 17 06:52PM -0400

On 3/17/2017 6:45 PM, Ramine wrote:
> and you don't use all your functions from the header, C++ compiler will
> not compile all the header, Delphi and Freepascal are better because
> when you compile a unit they will compile all the unit.
 
I have said that Delphi and FreePascal are better at compiling units
because they compile all the unit and they compile very fast, much
faster than C++..
 
 
 
Ramine <toto@toto.net>: Mar 17 05:38PM -0400

Hello...
 
 
I think that nationalism like neo-nazism is a bad idea, because read this:
 
"The economic models developed by the development economists of the
1960s, based on the idea of industrializing industries, seem to be
losing more and more of their unconditional supporters. The economic
development of a country or a region is no longer Dependent on the
development of the secondary sector or heavy industry. "
by M'Fadel El Halaissi, of which our readers are familiar, is Deputy
Chief Executive Officer of BMCE Bank.
 
 
Please read more here(you have to translate it from french to english,
because it is in french), it's from the Economist Magazine in Morocco
my country:
 
http://www.leconomiste.com/article/915791-la-conqu-te-conomique-de-l-afrique-passe-par-le-secteur-des-servicespar-m-fadel-el-ha
 
 
 
Thank you,
Amine Moulay Ramdane.
Ramine <toto@toto.net>: Mar 17 02:47PM -0400

Hello.....
 
 
My C++ MemPool for real-time systems was updated to version 1.02
 
I have cleaned up more the code..
 
 
Description:
 
Real-Time Memory Management
 
In C++, memory management is normally performed using new,delete etc.
The run-time system's heap offers great flexibility and efficiency, but
it cannot fulfil real-time requirements. The run-time requirements are
non-deterministic. In addition, they may require blocking task switches,
which makes them unusable for interrupt handlers.
 
MemPool uses templates and offers memory management with real-time
capabilities through Memory Pools. A Memory Pool is an isolated heap
with data buffers as objects of equal size. Any number of memory pools
can exist simultaneously. A pool is initialized once and allocated a
certain number of buffers as objects. Thereafter, buffers as objects can
be allocated and deallocated from the pool under real-time conditions.
 
How to use it?
 
The parameters of the constructor are:
 
The first parameter is the number of items and the second parameter is a
boolean parameter that will tell MemPool to grow or not, if it is set
to true it will grow, set it to false for real-time systems, if you
don't pass any parameter, the number of items will be set to 200 and the
MemPool will not grow and thus it will be set for real-time systems.
 
The New() method returns a reference to the object, it's in O(1) time
complexity.
 
The Return() method returns the reference to the object to the stack, it
's in O(1) time complexity.
 
Please look at the test.cpp example to learn how to use MemPool.
 
Language: GNU C++ and Visual C++ and C++Builder
 
You can download my C++ MemPool for real-time systems from:
 
https://sites.google.com/site/aminer68/c-mempool-for-real-time-systems
 
 
 
Thank you,
Amine Moulay Ramdane.
Ramine <toto@toto.net>: Mar 17 01:56PM -0400

Hello.....
 
About C++ and real-time systems...
 
You have finally understood my way of coding real-time softwares..
 
I think that you have to simplify the code in real-time and realtime
critical systems, so i think that you have to use less code and verify
it effectively, this is what i have done
 
Please look at the following memory pools:
 
http://www.mario-konrad.ch/blog/programming/cpp-memory_pool.html
 
You will notice that the operations using the heap are of logarithmic
nature, so it's not as efficient as my C++ MemPool for real-time systems
that is O(1) in its operations, and that uses also templates and that
has an interface that is carefully designed to be easy to use and efficient.
 
My way of designing real-time softwares that works under QNX real-time
OS and VxWorks real-time OSs and other real-time OSs..
 
To be able to implement real-time softwares that control robots etc.
i have first implemented my C++ MemPool for real-time systems,
now it is easy to verify it by taking a look at its source code etc.
also i have provided you with a C++ threadpool that permits you
to code real-time softwares, it is easy to verify the source
code of this C++ threadpool and you will notice that it only
uses static arrays and it doesn't use dynamic memory and of
course it uses pthread , so it is portable to QNX real-time OS
and to VxWorks real-time OSs and to other real-time OSs,
also i will provide you with thread-safe bounded FIFO queue
for real-time systems and a thread-safe bounded LIFO stack for
real-time systems , and you will be able with all this to
code for real-time OSs and control robots etc.
 
You can download the C++ threadpool from here:
 
https://sites.google.com/site/aminer68/c-threadpool
 
And you can download my C++ MemPool for real-time systems from here:
 
 
https://sites.google.com/site/aminer68/c-mempool-for-real-time-systems
 
Thank you,
Amine Moulay Ramdane.
Ramine <toto@toto.net>: Mar 17 01:06PM -0400

ello,
 
I have said that:
 
I have provided you with a C++ threadpool that permits you
to code real-time softwares, it is easy to verify the source
code of this C++ threadpool and you will notice that it only
uses static arrays and it doesn't use dynamic memory and of
course it uses pthread.
 
Please look at the Threadpool bounded queue size, it's at 10000,
so in real-time systems and in pratice it's easy to avoid blocking task
switches on the producer threads which makes it unusable for interrupt
handlers. To simplify, use for example one producer thread and don't go
beyond the size of the queue to be able to implement
real-time softwares under QNX real-time OS or VxWorks real-time OS etc.
 
You can download the C++ threadpool from here:
 
https://sites.google.com/site/aminer68/c-threadpool
 
And you can download my C++ MemPool for real-time systems from here:
 
https://sites.google.com/site/aminer68/c-mempool-for-real-time-systems
 
 
Thank you,
Amine Moulay Ramdane.
Ramine <toto@toto.net>: Mar 17 12:49PM -0400

Hello,
 
I have said that:
 
I have provided you with a C++ threadpool that permits you
to code real-time softwares, it is easy to verify the source
code of this C++ threadpool and you will notice that it only
uses static arrays and it doesn't use dynamic memory and of
course it uses pthread.
 
Please look at the Threadpool bounded queue size, it's at 10000,
so in real-time systems and in pratice it's easy to avoid a blocking
task switches on the producer threads which makes it unusable for
interrupt handlers. To simplify, use for example one producer thread and
don't go beyond the size of the queue to be able to implement
real-time softwares under QNX real-time OS or VxWorks real-time OS etc.
 
You can download the C++ threadpool from here:
 
https://sites.google.com/site/aminer68/c-threadpool
 
And you can download my C++ MemPool for real-time systems from here:
 
 
https://sites.google.com/site/aminer68/c-mempool-for-real-time-systems
 
Thank you,
Amine Moulay Ramdane.
Ramine <toto@toto.net>: Mar 17 12:00PM -0400

Hello....
 
 
My way of designing real-time softwares that works under QNX real-time
OS and VxWorks real-time OSs and other real-time OSs..
 
To be able to implement real-time softwares that control robots etc.
i have first implemented my C++ MemPool for real-time systems,
now it is easy to verify it by taking a look at its source code etc.
also i have provided you with a C++ threadpool that permits you
to code real-time softwares, it is easy to verify the source
code of this C++ threadpool and you will notice that it only
uses static arrays and it doesn't use dynamic memory and of
course it uses pthread , so it is portable to QNX real-time OS
and to VxWorks real-time OSs and to other real-time OSs,
also i will provide you with thread-safe bounded FIFO queue
for real-time systems and a thread-safe bounded LIFO stack for
real-time systems , and you will be able with all this to
code for real-time OSs and control robots etc.
 
You can download the C++ threadpool from here:
 
https://sites.google.com/site/aminer68/c-threadpool
 
And you can download my C++ MemPool for real-time systems from here:
 
 
https://sites.google.com/site/aminer68/c-mempool-for-real-time-systems
 
Thank you,
Amine Moulay Ramdane.
Ramine <toto@toto.net>: Mar 17 11:06AM -0400

Hello,
 
 
C++ Threadpool
 
Description:
 
This C++ Threadpool is portable, and i think it can be used to code
real-time softwares under QNX real-time OS or VxWorks real-time OS and
other real-time OSs, because look at the source code it uses just static
arrays and it doesn't use dynamic memory and of course it uses pthread,
and i have included pthread for win32 and win64 inside the zip file,
 
You can use it also with my C++ MemPool for real-time systems here:
 
https://sites.google.com/site/aminer68/c-mempool-for-real-time-systems
 
Please look at the example.cpp example to learn how to use this threadpool.
 
Language: GNU C++ and Visual C++ and C++Builder
 
 
 
Thank you,
Amine Moulay Ramdane.
Ramine <toto@toto.net>: Mar 17 11:08AM -0400

On 3/17/2017 11:06 AM, Ramine wrote:
 
> Thank you,
> Amine Moulay Ramdane.
 
I have made it compatible with GCC and with MSVC and with C++Builder.
 
 
Thank you,
Amine Moulay Ramdane.
Ramine <toto@toto.net>: Mar 17 11:19AM -0400

Hello,
 
You can download it from here:
 
https://sites.google.com/site/aminer68/c-threadpool
 
 
Thank you,
Amine Moulay Ramdane.
You received this digest because you're subscribed to updates for this group. You can change your settings on the group membership page.
To unsubscribe from this group and stop receiving emails from it send an email to comp.programming.threads+unsubscribe@googlegroups.com.

No comments: