Some Basic questions

I trying to understand the concepts of windows device drivers,from the walter ooneys text.

I am not able to understand the following two statements

1)Block only the thread that originated the request you are working on?

2)you cant block a thread if you are executing at or above dispatch level ?

> 1) Block only the thread that originated the request you are working on?

This probably means that you must be sure you are executing in the context of the requesting thread (and not some arbitrary thread context) if you make a blocking call.

  1. you cant block a thread if you are executing at or above dispatch level ?

You can’t make blocking calls from DISPATCH_LEVEL or above (although you can signal events from DISPATCH_LEVEL). That’s because running at DISPATCH_LEVEL disables scheduling on the current CPU.

> I trying to understand the concepts of windows device drivers,from the

walter ooneys text.

I am not able to understand the following two statements

1)Block only the thread that originated the request you are working on?

If you block some other thread, you are blocking some poor innocent
bystander thread, with indeterminate consequences.

2)you cant block a thread if you are executing at or above dispatch level
?

This is one of those fundamental rules of Windows kernel programming. You
can’t block a thread at >= DISPATCH_LEVEL because there is no scheduler
available to you. A thread at DISPATCH_LEVEL is by definition
unschedulable.

joe


NTDEV is sponsored by OSR

Visit the list at: http://www.osronline.com/showlists.cfm?list=ntdev

OSR is HIRING!! See http://www.osr.com/careers

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