News:

Choose a design and let our professionals help you build a successful website   - ITAcumens

Main Menu

Multiple Drivers Initialization Threads

Started by thiruvasagamani, Jun 03, 2009, 09:08 PM

Previous topic - Next topic

thiruvasagamani

Multiple Drivers Initialization Threads

The Windows CE device drivers are loaded in sequence according to the device loading order specified in the registry. Basically the main device.exe thread would call the Init function of each driver sequentially. Since some device drivers may have Sleep calls in their Init functions. During this sleeping time, the CPU time is wasted because there are not much other tasks going on.

To fully utilize CPU time during the device driver initialization, additional threads can be created to load/initialize the drivers. There are various techniques to accomplish this. For example, when a built–in audio related device driver's registry entry is renamed—for example, from BuiltIn to BuiltInAudio—then this driver would not be initialized by the device.exe. Instead, the i2c driver would initialize this driver by creating a thread that calls ActiveDeviceEx on those registry keys.

Since the main device.exe thread does not need to initialize the audio related drivers, the device.exe finishes sooner and the gwes.exe starts up earlier. The i2c thread can continue to initialize the device drivers while the gwes is initializing the display. Since usually there are some Sleep calls in the initialization phase of the device drivers and the display driver, this overlapping of two initialization threads make use of the CPU bandwidth effectively (no wasted bandwidth on useless sleeps). Therefore the system boots up generally faster.

Source : MSDN
Thiruvasakamani Karnan