[Autogenerated] The next object type, IDE like to discuss,
is called an executive resource, and just like a fast tex it,
is only available, in the kernel for kernel usage,
and kernel device driver usage.
When we looked at a tex or fast Tex, their purpose,
is to protect,
shared data from concurrent access by allowing only a single thread,
to access that data by running some piece of code and
Although that works this is perhaps, a bit too,
pessimistic for certain cases, a bit too extreme.
For example, suppose you have some data which is mostly read by threads,
but seldom written.
In the that case tex might be an overkill because in most cases,
the access is in a read kind of way which we know that is never.
A problem in terms of of database it doesn't matter how many threats,
read some data its it's not going to be a database an executive resource tries,
to solve that by providing support for a single right.
To multiple readers shared, access and the idea,
is This suppose you have a data structure.
That has lots of reads, and few rights.
Now, if thread wants to perform some operation,
in the the data It needs to Ask either for the exclusive
writer log or or the shared reader log indicating its only
going to read from the data.
So this is not exported.
To user mode and there,
are special APIs to use for these data structure which is
called es source behind the scenes, and you,
can see there, are two acquisition functions.
One of them is the exclusive acquisition saying,
hey, I would like to be a writer, which means that I can only be the only one,
accessing,
that object at a time or I can Say I want to acquire the shared
blog which means I would like to read the data,
and I'm OK with other threads reading the data at the same time as well.
So obviously the purpose of the executive resources here,
is to manage, that kind of thing.
To make sure that Indeed.
If there's a writer, all readers have to Wait,
if their readers in and the writer comes along,
it will have to Wait until all readers.
Are done.
So that's the idea An example of a data structure.
That works well for this kind of scenario.
Is called a cache Sometimes you build the cache of whatever and a good cache
is The one where you have lots of res to satisfy data coming from the cache
using some key which is search for very fast.
And very few rights.
So it changes slowly but read, a lot using a T tax would be too restrictive.
You will hurt concurrency, an exact resources here, is a better approach.
By the way there, is such an object.
That provides similar functionality.
To user mode it, is called S R W lock or slim reader writer lock.
You can find the API documented in the user mode Windows API documentation.
It's not the same object,
but it provides a similar capability locally for threats running within a
particular process in user mode only an executive resource,
is for kernel usage, and kernel driver usage,
only