Driver contract changes in Win 7

I thought it sounded pretty cool myself.

mm

As anyone who has authored a paper will know, you will always have people
who prefer other wording. Overall I believe the documentation for the WDK
keeps improving and that is all that the community can reasonably ask for.
Of course most of us are unreasonable :wink: so we will want more.


Don Burn (MVP, Windows DKD)
Windows Filesystem and Driver Consulting
Website: http://www.windrvr.com
Blog: http://msmvps.com/blogs/WinDrvr

wrote in message news:xxxxx@ntdev…
> As the person responsible for the word “affinitize” appearing in said
> document, I was encouraged that bing turned up 3,840 references to the
> word. Most are in computer science but refer to the affinity of all
> manner of one thing to another. Some are in chemistry and other fields.
> And a few refer to this word as a neologism.
>
> I also just think it’s a great word. But now I’m just justifying myself.
>
> Dave
>
>
> Information from ESET NOD32 Antivirus, version of virus
> signature database 4378 (20090828)

>
> The message was checked by ESET NOD32 Antivirus.
>
> http://www.eset.com
>
>
>

Information from ESET NOD32 Antivirus, version of virus signature database 4378 (20090828)

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com

Cay Bremer wrote:

On Fri, 28 Aug 2009 19:05:40 +0200, Tim Roberts wrote:
>> Noah Webster is rolling over in his grave. Microsoft has a bad habit of
>> inventing new words by verbizing their nouns.
>
> Is this a deliberate joke or not? :wink:

Yes, it was…

> According to Merriam-Webster’s Online Dictionary, the word you mean is
> “verbalize”.

Hmmm. I usually interpret “verbalize” to mean “to put into words”. I’m
trying to verbalize my respond to this email. However, I see that M-W
does allow “verbalize” to mean “to convert into a verb.”

Your scolding is accepted.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.

xxxxx@microsoft.com wrote:

As the person responsible for the word “affinitize” appearing in said document, I was encouraged that bing turned up 3,840 references to the word. Most are in computer science but refer to the affinity of all manner of one thing to another. Some are in chemistry and other fields. And a few refer to this word as a neologism.

I also just think it’s a great word. But now I’m just justifying myself.

You might say you are legitimizing your choice.

I think I will go lunchize my day now.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.

[begin quote]

Short list: actionable compliance/compliant (perhaps the worst of them all in my book)
tco
roi
coaching
mentoring
leadership values
core values
vision
aware
independent
transparent …

[end quote]

I would add free (particularly when it gets combined with “environment” - for example, “smoke-free environment”), oriented and based to the above list…

Anton Bassov

I thought the word was “verbing”…

But then I work for Microsoft.


Jake Oshins
Hyper-V I/O Architect
Windows Kernel Group

This post implies no warranties and confers no rights.


“Tim Roberts” wrote in message news:xxxxx@ntdev…
> James Harper wrote:
>>
>> It’s an interesting read. Thanks.
>>
>> It also contains the first use I have ever come across of the word
>> “affinitizes”, as in the dot point “Is performance critical and
>> affinitizes interrupt and deferred procedure call (DPC) workload beyond
>> the first 64 processors.”.
>>
>
> Noah Webster is rolling over in his grave. Microsoft has a bad habit of
> inventing new words by verbizing their nouns.
>
> –
> Tim Roberts, xxxxx@probo.com
> Providenza & Boekelheide, Inc.
>
>

+1

Though the word itself is the product of, you know, verbing/verbification.

mm

>

As the person responsible for the word “affinitize” appearing in said
document, I was encouraged that bing turned up 3,840 references to the
word.
Most are in computer science but refer to the affinity of all manner
of one
thing to another. Some are in chemistry and other fields. And a few
refer to
this word as a neologism.

I also just think it’s a great word. But now I’m just justifying
myself.

I love the English language and even if the word ‘affinitize’ had never
ever been used before (it had, based on your web search) I knew exactly
what was meant by it and it does indeed seem like a great space saver…
if someone had come to you and said “you can’t use the word affinitize
here” what would you have replaced it with?

James

Can this posix style CV be done using a semaphore (which can remember a
signal)?.
Harish

-----Original Message-----
From: Pavel Lebedinsky [mailto:xxxxx@microsoft.com]
Sent: Thursday, August 27, 2009 3:28 AM
To: Windows System Software Devs Interest List
Subject: Re:[ntdev] Driver contract changes in Win 7

Consider two synchronization (auto reset) events which protect a
shared
buffer like in a consumer/producer fashion:

Reader thread:

R1)Read from the buffer
R2)PulseEvent (readEvent,0,TRUE) // Signal writer that reading is
done
R3)WaitForSingleObject(writeEvent)
R4)goto A1

Writer thread:

W1)Write to the buffer
W2)PulseEvent(writeEvent,0,TRUE) // Signal read thread that writing is

done
W3)WaitForSingleObject(readEvent) // Wait until reader did reading
W4)Goto W1

With atomic set and wait this will work as expected:
R1-R2-R3-W4-W1-W2-W3-R4-R1-R2-R3-etc.

Without atomic set and wait, the order may become:
R1-R2-W4-W1-W2-R3-W3 -> deadlock

This is the “missed pulse” problem that often comes up when people
try to implement something similar to POSIX condition variables
using win32 events. Some people attempt to solve it using
SignalObjectAndWait (which internally uses the Wait=TRUE trick)
but this is still not 100% reliable (even pre-win7) because an APC
can temporarily remove the thread from its wait, causing it to
miss a pulse anyway. (This is why PulseEvent is now deprecated,
by the way).

Drivers can disable APCs so technically it’s possible to construct
a kernel-mode example that seems to work reliably on previous
OS versions and suffers from the missed pulse problem on win7.
However, I think that behavior in this case was not well-defined
to begin with, so it’s not something that drivers should be relying on.


Pavel Lebedinsky/Windows Kernel Test
This posting is provided “AS IS” with no warranties, and confers no
rights.


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer

Just an aside Q, out of all the known natural languages which one is
more ( or most formalized) from the language processing point of view??

Long time back I heard that Russian is one of them …

-pro

> I thought the word was “verbing”…

Reminds me what a fascinating subject linguistics is,
http://en.wikipedia.org/wiki/Verbification

Jan

Guys,

Probably it makes sense to move a linguistic discussion to NTTALK…

What do you think?

Anton Bassov

> Can this posix style CV be done using a semaphore (which can remember a signal)?.

Well, starting from Vista Win32 provides API to deal with convars. However, if you are just desperate to implement it yourself. Look at how it can get done

#define MAXCOUNT whatever

struct condvar {HANDLE mutex; HANDLE semapthore; HANDLE event; DWORD count; };

int pthread_cond_init(pthread_cond_t *restrict cond, const pthread_condattr_t *restrict attr)
{

struct condvar* target=(struct condvar*)cond;

target->mutex=CreateMutex(0,0,0);

target->semaphore=CreateSemaphore(0,0,MAXCOUNT,0);

target->event=CreateEvent(0,0,0,0);

target->count=0;

return 0;

}

int pthread_cond_wait(pthread_cond_t *restrict cond, pthread_mutex_t *restrict mutex)
{

struct condvar* target=(struct condvar*) cond;

//check whether we own mutex (it can be done with undocumented ZwQeueryMutant()
//and return failure if we don’t. From now on we assume we are mutex owners

if(target->count==MAXCOUNT) return -1; //we don’t want to exceed maxcount for semaphore,do we…

target->count++;

ReleaseMutex(target->mutex);

WaitForSingleObject(target->semaphore,INFINITE);

if(!InterlockedDecrement(target->count))SetEvent(target->event);

return 0;

}

int pthread_cond_broadcast(pthread_cond_t *cond)
{

struct condvar* target=(struct condvar*) cond;

WaitForSingleObject(target->mutex,INFINITE);

if(target->count)
{

ReleaseSemaphore target->semaphore, target->count,0);

WaitForSingleObject(target->event,INFINITE);
}

ReleaseMutex(target->mutex);

return 0;
}

As you can see it yourself, there is no need for atomicity, let alone for PulseEvent(), in order to implement condvars on Windows…

Anton Bassov

> 1) KeSetEvent never returns with the Dispatcher Lock held, because there is

no dispatcher lock any more.

At all? Is it not split to several smaller locks?


Maxim S. Shatskih
Windows DDK MVP
xxxxx@storagecraft.com
http://www.storagecraft.com

> Consider two synchronization (auto reset) events which protect a shared

buffer like in a consumer/producer fashion:

Reader thread:

R1)Read from the buffer
R2)PulseEvent (readEvent,0,TRUE) // Signal writer that reading is done
R3)WaitForSingleObject(writeEvent)
R4)goto A1

Much better approach is to always maintain ReadEvent as signaled when there is some data in the buffer, and WriteEvent signaled when there is free space in the buffer.

No deadlocks at all.


Maxim S. Shatskih
Windows DDK MVP
xxxxx@storagecraft.com
http://www.storagecraft.com

> Event C synchronizes an access to the buffer, and events A and B

2 events (A and B) and a lock (C).

This works fine.


Maxim S. Shatskih
Windows DDK MVP
xxxxx@storagecraft.com
http://www.storagecraft.com

> I DO have lots of trouble with other word uses:

Peter, you’re a native English speaker. So, life is simpler for you. :slight_smile:

For non-native English developers, their native languages are contaminated a lot with new Anglicisms related to programming. This process sometimes becomes just plain funny, much more funny then this “verbizing” discussion.

It is not translatable to English though, so I cannot provide the community with samples.


Maxim S. Shatskih
Windows DDK MVP
xxxxx@storagecraft.com
http://www.storagecraft.com

> actionable

coaching
mentoring
leadership
values
core values
vision

These ones are especially idiotic “duckspeak” (Orwell was a great writer).


Maxim S. Shatskih
Windows DDK MVP
xxxxx@storagecraft.com
http://www.storagecraft.com

> I would add free (particularly when it gets combined with “environment” - for example,
>“smoke-free environment”), oriented and based to the above list…

VMWare is a very respected company for me, but the homepage of their website is just a great sample of this “duckspeak”.


Maxim S. Shatskih
Windows DDK MVP
xxxxx@storagecraft.com
http://www.storagecraft.com

> Just an aside Q, out of all the known natural languages which one is

more ( or most formalized) from the language processing point of view??

Long time back I heard that Russian is one of them …

Not at all.

Russian is by far harder for formalization then English.

  1. noun cases denoted by suffixes and also by prepositions. In English, the only such suffix is “Peter’s” for genitive, Russian has a full set of them - usually vowels - Petr/PetrU and so on.

Prepositions are also here.

Some ancient relicts like locative case (used only with several words in the whole language) and pair grammatic number (same kind of rules exception) are also here.

  1. Unstable word order, no stable SVO or VSO, especially in poetry.

  2. True grammatic gender in nouns which influences the suffixes of the dependent adjectives. For non-Russian, it is nearly impossible to guess whether the new-for-him noun is feminine, masculine or neutral.

So are the aforementioned exceptions like the locative case. Non-Russian will have hardships to define whether “on something” must be a locative (exception) or the rules-prescribed “prepositional case”. “In the snow” is locative in Russian, but “in the sand” is prepositional.

I have heard that Spanish is easy for foreigners (easier then English), also note that the Esperanto artificial language was based on Spanish. So, Spanish is probably easier for formalization.

Hebrew language, on the other hand, has a reputation of very hard languages for the foreigners.


Maxim S. Shatskih
Windows DDK MVP
xxxxx@storagecraft.com
http://www.storagecraft.com