Re:Driver Programming Fundamentals/Philosophy, was: Re: Calling NdisRequest() from ProtoclBi

In my experience, most grads of any program (including pure math, as in
my case) have nothing in particular to offer in the short term when it
comes to this stuff. The world is just not experienced in text books.

mm

>> xxxxx@acm.org 2007-03-26 08:35 >>>

“bank kus” wrote in message news:xxxxx@ntdev…
>I mean this in a good way but, in depth knowledge of WHAT?? What
exactly
>is the definition of kernel mode programming.
>
> How difficult is it for a guy with a solid CS background and a good
> understanding of OS / comp architecture to pickup an API? I fail to
see
> what is so rocket science about it. More often than not driver
writers
> bang registers from 1000 page manuals written by RTL programmers and

> designed by a bunch of architects ( which I believe is the difficult
part
> and includes understanding of good science )
>

I will add you to my list of people who I ask to please tell me the
products that you work on, so I can be sure to avoid them and tell my
customers to. Sorry, but there is a lot more to good driver writing
that
banging registers. Some of the biggies are:

1. A strong consideration of reliability/security

Most CS grads do not have this. When an application crashes
or
hangs it is annoying, but unfortunately all to common. But the same
attitude in a driver causes a system crash with significantly more
impact.
Microsoft contents that most system crashes are 3rd party drivers, and
all
evidence is this is true.

2. A strong comfort factor with concurrency

Even good multi-threaded application programmers can be
terrible
driver writers. In the kernel concurrency is dictated to you, where as
in
most application space you control concurrency. This can even be true
as a
driver writer coming from another OS, right now I am dealing with a
firm
that mainly works with ***X derived systems, they were surprised that
they
had to support PnP and not just say “I don’t want it for that device”

3. A strong understanding of the whole API set

A goal of a driver writer should be to write as little code
as
possible. While this may be true in other programming disciplines, it
is
critical in driver writing. First, this typically improves reliability

since the OS is likely to have more testing than your drivers code.
Second
is to reduce the footprint of the driver, which even with the large
amount
of memory in systems today, should be treated as a scarce resource.

I’ve been writing drivers for 36 years, and in that time coding and
debugging for “banging registers” has been too tiny to measure.


Don Burn (MVP, Windows DDK)
Windows 2k/XP/2k3 Filesystem and Driver Consulting
Website: http://www.windrvr.com
Blog: http://msmvps.com/blogs/WinDrvr
Remove StopSpam to reply


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

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