Thursday, June 25, 2020

Digest for comp.programming.threads@googlegroups.com - 4 updates in 3 topics

aminer68@gmail.com: Jun 24 06:17AM -0700

Hello,
 
 
More precision about my inventions that are my SemaMonitor and SemaCondvar and my Monitor..
 
My inventions that are my SemaMonitor and SemaCondvar are fast pathed when the count of my SemaMonitor or my SemaCondvar is greater than 0, so in this case the wait() method stays on the user mode and it doesn't switch from user mode to kernel mode that costs around 1500 CPU cycles and that is expensive, read here about it:
 
https://stackoverflow.com/questions/1368061/whats-the-cost-in-cycles-to-switch-between-windows-kernel-and-user-mode#:~:text=1%20Answer&text=Switching%20from%20%E2%80%9Cuser%20mode%E2%80%9D%20to,rest%20is%20%22kernel%20overhead%22.
 
You can read about and download my inventions of SemaMonitor and SemaCondvar from here:
 
https://sites.google.com/site/scalable68/semacondvar-semamonitor
 
And the light weight version is here:
 
https://sites.google.com/site/scalable68/light-weight-semacondvar-semamonitor
 
And i have implemented an efficient Monitor over my SemaCondvar.
 
Here is the description of my efficient Monitor inside the Monitor.pas file that you will find inside the zip file:
 
Description:
 
This is my implementation of a Monitor over my SemaCondvar.
 
You will find the Monitor class inside the Monitor.pas file inside the zip file.
 
When you set the first parameter of the constructor to true, the signal will not be lost if the threads are not waiting with wait() method, but when you set the first parameter of the construtor to false, if the threads are not waiting with the wait() method, the signal will be lost..
 
Second parameter of the constructor is the kind of Lock, you can set it to ctMLock to use my scalable node based lock called MLock, or you can set it to ctMutex to use a Mutex or you can set it to ctCriticalSection to use the TCriticalSection.
 
Here is the methods of my efficient Monitor that i have implemented:
 
TMonitor = class
private
cache0:typecache0;
lock1:TSyncLock;
obj:TSemaCondvar;
cache1:typecache0;
 
public
 
constructor Create(bool:boolean=true;lock:TMyLocks=ctMLock);
destructor Destroy; override;
procedure Enter();
procedure Leave();
function Signal():boolean;overload;
function Signal(nbr:long;var remains:long):boolean;overload;
procedure Signal_All();
function Wait(const AMilliseconds:longword=INFINITE): boolean;
function WaitersBlocked():long;
 
end;
 
 
The wait() method is for the threads to wait on the Monitor object for
the signal to be signaled. If wait() fails, that can be that the number
of waiters is greater than high(longword).
 
And the signal() method will signal one time a waiting thread on the
Monitor object, but if signal() fails , the returned value is false.
 
the signal_all() method will signal all the waiting threads on
the Monitor object.
 
The signal(nbr:long;var remains:long) method will signal nbr of
waiting threads, but if signal() fails, the remaining number of signals
that were not signaled will be returned in the remains variable.
 
and WaitersBlocked() will return the number of waiting threads on
the Monitor object.
 
and Enter() and Leave() methods to enter and leave the monitor's Lock.
 
 
You can download the zip files from:
 
https://sites.google.com/site/scalable68/semacondvar-semamonitor
 
and the lightweight version is here:
 
https://sites.google.com/site/scalable68/light-weight-semacondvar-semamonitor
 
 
Thank you,
Amine Moulay Ramdane.
Scott Newman <scott69@gmail.com>: Jun 24 07:37PM +0200

As always your code is buggy.
And Pascal is outdated.
aminer68@gmail.com: Jun 24 10:35AM -0700

Hello,
 
 
More political philosophy about globalization and nationalism..
 
I am a white arab and i think i am more smart, so today i will
talk about a very important subject about Globalization and nationalism,
so i will invite you to look at the following video of Marine Le Pen of
the far-right political party in France:
 
Marine Le Pen explains why nationalism is important
 
https://www.youtube.com/watch?v=fNpI9wKnE8Q
 
 
As you notice that Marine Le Pen is saying in french that the
fight today is between nationalism and globalization, since
Marine Le Pen says that globalization is a treat to national
identity and is a treat to national sovereignty, but i think that Marine Le Pen is not understanding correctly globalization, since i think that nationalism is too much competition and communism and socialism is too much collaboration , so i think the best way is to seek like a balance between collaboration and competition and when we look at globalization you will notice that we are collaborating with others by for example sharing Open Source softwares or Free softwares or PhD papers or knowledge on internet etc, and we are also competition by not collaborating with others, and with this new kind of model we are noticing that we are not just one identity like being french, but we are becoming multiple identities because this kind of new model is making a part of us that collaborate "universal", and this is why i think that Marine Le Pen is not understanding correctly this new kind of model of like seeking a balance between competition and collaboration , and i think that this new model is better because it is more efficient , because think this partly collaboration of this new model is good and more efficient for creativity, innovation, adaptability and speed of progress, i also think in capitalism the price of internet has gotten cheap and the price of computers has gotten cheap, so we are able today to access internet with a low price and benefit from "collaboration" and also sharing in internet, for example look at me, i have invented many scalable algorithms and i have decided to share some of them with the others, and it is of course collaboration , so look for example at my following inventions of scalable algorithms that i have shared with others, here they are:
 
https://sites.google.com/site/scalable68/scalable-mlock
 
https://sites.google.com/site/scalable68/scalable-reference-counting-with-efficient-support-for-weak-references
 
https://sites.google.com/site/scalable68/scalable-rwlock
 
https://sites.google.com/site/scalable68/scalable-rwlock-that-works-accross-processes-and-threads
 
https://groups.google.com/forum/#!topic/comp.programming.threads/VaOo1WVACgs
 
https://sites.google.com/site/scalable68/an-efficient-threadpool-engine-with-priorities-that-scales-very-well
 
Also i have decided to not share others of my scalable algorithms and it is competition, so i am seeking like a balance between collaboration and competition.
 
 
More political philosophy about beauty..
 
I am a white arab, and i think i am more smart, and today i will talk
about: Does beauty exist ? and i will start it by saying the following:
 
When you are smart you will notice that you can think beauty systemically or think beauty individually, also by logical analogy you will notice that beauty can depend on the layer of abstraction, so it can be when you look at a thing from the outside , it looks beautiful
and when you look at it from the inside or from the details it looks
not beautiful, i give you an example:
 
I said that Democracy has two protecting walls, first protecting wall is that it is better at fighting corruption(and corruption is also lack of efficiency in governing, read below to notice it), and Democracy has a second protecting wall that it must not be "extremism" that harms Democracy.
 
So as you are noticing that the second protecting wall
is the "tendency" that doesn't get into the details, so do we have to
be pessimistic and say that Democracy is not beautiful ? i don't think
so, because to understand more about beauty we have by analogy to compare it with my following writing about Morality:
 
-------------------------------------------------------------------
 
As you have noticed i have just said (read below) the following:
 
"First you have to know how to take care of your "image" , and
taking care of your image is also an engine that pushes you
forward towards more perfection, but there is also my Rule of:
"More perfection brings satisfaction" that is also an engine
that pushes you forward towards more and more perfection,
since also i said that this satisfaction is double satisfaction
as i explained it to you by saying:
 
"When you are preparing and cooking a beautiful Moroccan couscous and
eating it, you will feel doubly satisfied by being satisfaction of being
this more perfection of preparing and cooking the beautiful Moroccan
couscous and you will also be satisfaction of eating it even if it comes
with the "difficulty" of preparing and cooking and of learning how to
prepare and to cook a beautiful Moroccan couscous. That's an efficient
philosophy. And it is also my spirit.""
 
But you have to be "smart" to understand my example above, the double
satisfaction is also the intellectual or cultural satisfaction
and the material satisfaction, because knowing how to cook
a Moroccan couscous is intellectual or cultural and eating a
Moroccan couscous is material.
-----------------------------------------------------------------
 
 
So as you are noticing that my Rule of: "More perfection brings satisfaction" comes also with the not beautiful of the effort that we have to be so that to be satisfaction, this is by logical analogy the same for Democracy, the second protecting wall of the Democracy also is the satisfaction of not being extremism that harms Democracy, but when you get into the details it can be somewhat not beautiful, but we have to know how to be tolerance and patience about it(read below my writing about Donald Trump to notice it), so now you are understanding my kind of philosophy about it, it looks like my following thoughts:
 
---------------------------------------------------------------------
And more political philosophy about money to understand more:
 
When you look at the beautiful, like a beautiful moon in the night,
you will notice that it is like a satisfaction of looking at the
beautiful, but at the same time the moon is also a wild place and
dangerous place, so by logical analogy, if you only work for money , it
it is like thinking at the other side of the moon that is dangerous for
us and that is a wild place and logically inferring that the world is
not beautiful and that this or that thing can look beautiful but our
world is not beautiful and that this spirit makes you like hating our
world, but saying so and being so is like working only for money and it
is a "corruption" of the mind, so you have to change your "perception"
and "conception" and to think differently by adhering to my Rule of:
"More perfection brings satisfaction", it means that more perfection
brings a satisfaction of being more perfection, and this Rule is an
engine that pushes you forward towards more and more perfection, and
this is also an efficient spirit and it is also my spirit.
 
Read more on my thoughts here about Morality:
 
https://groups.google.com/forum/#!topic/alt.culture.morocco/7UmkfURwoU4
-----------------------------------------------------------------------
 
 
So to answer the question above of: Does beauty exist ? we can say that
it is by analogy as to what i am saying below about competition and collaboration, that we have to seek a balance between collaboration and competition, it is analogically the same as beauty, since i think that life is a balance between the beautiful and the not beautiful, and can we say that life is not beautiful ? i don't think so, because we are getting "satisfactions" from it that prove that life is not that is not beautiful.
 
And about the universality of beauty , read my following thoughts:
 
Is beauty universal ?
 
I will make you understand with smartness what about the following webpage:
 
Look at the following webpage from BBC:
 
The myth of universal beauty
 
https://www.bbc.com/future/article/20150622-the-myth-of-universal-beauty
 
So notice in the above webpage that it is saying the following about
beauty:
 
"Where starvation is a risk, heavier weight is more attractive"
 
 
So you have to understand that the above webpage from BBC is not smart,
i will make you understand with smartness that beauty is universal,
so if we take the following sentence of the above webpage:
 
"Where starvation is a risk, heavier weight is more attractive"
 
So you have to put it in the context of the above webpage, and
understand that the way of thinking of the webpage from BBC is not smart, because it is saying that since in the above sentence starvation is a risk , so heavier weight can be more attractive, but this can be heavier weight that is not beautiful for the eyes, so it makes a conclusion that universal beauty is not universal, but this is not smart because we have not to measure beautifulness with only our eyes and say that heavier weight that is not beautiful for the eyes is not beautiful, because we have to measure it with smartness and say that smartness says that in the above sentence that heavier weight that is not beautiful for the eyes is beautiful for smartness because starvation is a risk, so then with smartness we can say that beauty is universal. So we have to know that that the system of reference of measure is very important, by logical analogy we can say that measuring beautifulness with the eyes is like measuring individual smartness with only genetics, but measuring beautifulness with both the eyes and smartness is like measuring individual smartness with both the genetical and the cultural.
 
 
More political philosophy about proactivity of morality..
 
I said below the following:
 
----------------------------------------------------------------------
 
More political philosophy about politics..
 
I am a white arab, and i think i am like a genius since i have invented
many scalable algorithms and there implementations, so i will invite
you to look carefully at my following thoughts of my political philosophy about Morality:
 
https://groups.google.com/forum/#!topic/alt.culture.morocco/7UmkfURwoU4
 
 
So if you are like a genius like me, you will notice that my philosophy
above about Morality shows the "tendency" of the essence of Morality or Morality that is also seeking a "balance", and it doesn't get into the details, it is by logical analogy the same as what i am saying below about competition and collaboration, since i said that the best way is to seek a balance between competition and collaboration, and it is by logical analogy the same as Democracy, since Morality of Democracy doesn't get into the details , but Democracy shows the "tendency" that it must not be "extremism" that harms Democracy and Morality of Democracy is "not" completely purifying from evil.
 
----------------------------------------------------------------------
 
 
So as you are noticing i am saying the following:
 
 
"Morality of Democracy is "not" completely purifying from evil"
 
 
And if you are smart You will notice that i am not saying it in relative but "absolute"(I mean: the same in all situations), and it is truth in absolute.
 
Other than that you will notice that Democracy has two protecting walls,
first wall is that it is better at fighting corruption(and corruption is also lack of efficiency in governing, read below to notice it), and Democracy has a second protecting wall that it must not be "extremism" that harms Democracy. But here again you are noticing that we have to be proactive in Democracy to avoid corruption of the minds of people, and i have for example said the following about it:
 
---------------------------------------------------------------------
And more political philosophy about money to understand more:
 
When you look at the beautiful, like a beautiful moon in the night,
you will notice that it is like a satisfaction of looking at the
beautiful, but at the same time the moon is also a wild place and
dangerous place, so by logical analogy, if you only work for money , it
it is like thinking at the other side of the moon that is dangerous for
us and that is a wild place and logically inferring that the world is
not beautiful and that this or that thing can look beautiful but our
world is not beautiful and that this spirit makes you like hating our
world, but saying so and being so is like working only for money and it
is a "corruption" of the mind, so you have to change your "perception"
and "conception" and to think differently by adhering to my Rule of:
"More perfection brings satisfaction", it means that more perfection
brings a satisfaction of being more perfection, and this Rule is an
engine that pushes you forward towards more and more perfection, and
this is also an efficient spirit and it is also my spirit.
-----------------------------------------------------------------------
 
Also you have to be proactive in Democracy by correctly educating people and by being Mass media that are responsable and that correctly educate people.
 
 
And read my previous thoughts to understand more:
 
More political philosophy about politics..
 
I am a white arab, and i think i am like a genius since i have invented
many scalable algorithms and there implementations, so i will invite
you to look carefully at my following thoughts of my political philosophy about Morality:
 
https://groups.google.com/forum/#!topic/alt.culture.morocco/7UmkfURwoU4
 
 
So if you are like a genius like me, you will notice that my philosophy
above about Morality shows the "tendency" of the essence of Morality or Morality that is also seeking a "balance", and it doesn't get into the details, it is by logical analogy the same as what i am saying below about competition and collaboration, since i said that the best way is to seek a balance between competition and collaboration, and it is by logical analogy the same as Democracy, since Morality of Democracy doesn't get into the details , but Democracy shows the "tendency" that it must not be "extremism" that harms Democracy and Morality of Democracy is "not" completely purifying from evil.
 
Read my following thoughts of my political philosophy to understand more:
 
About more political philosophy about Democracy and the West..
 
I am a white arab, and i think i am more smart, and i will
talk today about a very important thing, and i think it is
what we call "purifying" from evil, i think that the problem of
the West is that it is not understanding that Democracy
is not completely "purifying" from evil, but Democracy doesn't accept "extremism" that harms it, this is the weakness of the West, people of the West are not understanding Democracy of the West, and here is what
i said about Democracy:
 
-------------------------------------------------------------------
 
More political philosophy about Democracy..
 
You have to understand more deeply Democracy, since Donald Trump is not here to please "all" americans, but we have to know about the essence
of Democracy, because Democracy is here because of constraints, since
there is a characteristics in morality that is a first protecting wall and there is a characteristic in Democracy that is a second protecting wall(read below to notice it), but you have to understand the essence of morality and the essence of Democracy, because Democracy doesn't mean that it is people that choose, because it is not in accordance with the essence of morality that must be the King(read below to notice it), since
aminer68@gmail.com: Jun 24 05:47AM -0700

Hello,
 
 
About my inventions that are my SemaMonitor and SemaCondvar..
 
My inventions that are my SemaMonitor and SemaCondvar are fast pathed when the count of my SemaMonitor or my SemaCondvar is greater than 0, so in this case they stay on the user mode and they do not switch from user mode to kernel mode that costs around 1500 CPU cycles and that is expensive, read here about it:
 
https://stackoverflow.com/questions/1368061/whats-the-cost-in-cycles-to-switch-between-windows-kernel-and-user-mode#:~:text=1%20Answer&text=Switching%20from%20%E2%80%9Cuser%20mode%E2%80%9D%20to,rest%20is%20%22kernel%20overhead%22.
 
You can read about and download my inventions of SemaMonitor and SemaCondvar from here:
 
https://sites.google.com/site/scalable68/semacondvar-semamonitor
 
And the light weight version is here:
 
https://sites.google.com/site/scalable68/light-weight-semacondvar-semamonitor
 
 
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: