[Autogenerated] We already know that Every process has its
own handle table where each handle points,
to some object internal space.
Obviously one thing we cannot do because the handle table,
is private, is somehow, to pass along the number itself of that handle,
to another process, and say, hey, let's just use the same object.
Let's share that object,
that will not work because every process has its own handle table.
On the other hand, kernel objects reside in kernel space,
which means they are sharable by definition,
at least in a conceptual manner.
So how can we share objects?
Between processes.
Sometimes this is very useful and I'll give a Few examples
later on Windows provides three ways of performing this
kind of sharing the first way.
Is to use a name.
If we have a particular name for an object.
We can share it between processes.
We'll discuss what that means.
A bit later, and IDE demonstrate what that looks like this.
Is definitely the simplest mechanism, but it doesn't always work for one,
not all object types can have names.
So in some cases, this is simply irrelevant.
And There's another potential disadvantage which I'll us later on.
As well.
The second option, is called process handling inheritance,
this mechanism, is very simple.
To use but it is very specific to a particular scenario
when process a creates process B, and While creating process B,
it's possible from process a to specify a bunch of handles,
to be duplicated, to the newly created process,
we'll demonstrate that as well.
Of course,
the third option which is the most comprehensive and
the most general it always works,
but it has some significant downside which I'll discuss as well.
Its called duplicating, a handle, and The idea here,
is that we can duplicate the handle from one process.
To another process assuming we have enough power in terms of how to contact,
these processes, we can duplicate the handle.
So, that the second handle points,
to exactly the same object as the first handle.
So this is indeed the most generic mechanism.
It always works.
And it's not very difficult.
To use in technical terms but does have one
significant disadvantage which I'll discuss.
So let's start with the first option which is sharing an object by name.
Here's the scenario we'd like to implement.
Let's say we have a process.
Let's call it a controller process.
Let's say that it controls a bunch of worker processes.
Let's say, for example,
the controller process might have some graphical user interface where
there is perhaps a human user working with the system.
And we have a bunch of worker processor doing some kind of work.
For this software system.
Let's assume that At some point, we want to shut down all these processes.
So we want to send some kind of message.
To these processes in order to Tell them, hey, let's gracefully shut down.
So the point, is not to terminate.
These processes forcefully.
That wouldn't be beneficial.
Instead, we would like to somehow convey a message, to the other processes.
Here it's time.
To shut down.
And the question, is How can we do that So there,
are many ways, that we can tackle.
This problem.
One of them would be to use an object,
that would be shared between all these processes,
and we do data sharing by name.
So let's see what that looks like.