Daily Archives: February 21, 2008

How to use AWE

1. Add /AWE to the boot.ini file.
2. add Lock Pages in Memory to the user’s User Rights Assignments. For more information on how to do this, see “User Rights” in the operating system help.
3. Add #define _WIN32_WINNT 0x0500 before the sample codes provided by ms.

Physical Address Extension

If your winxp system has more than 4GB memory, and you want to use it. You can add /PAE flag to the booting system item of your boot.ini file. If you want to allocate more than 2GB memory for your process, you can try adding /3GB to your boot.ini file. But this flag doesn’t gaurantee you can use 3GB memory in your application, because the system may not have enough virtural address space for you, for example, your machine has installed lots of I/O cards. If you do install many I/O cards, and still want to use more than 2GB memory, you can use AWE function calls of windows to do so, like AllocateUserPhysicalPages, MapUserPhysicalPages, MapUserPhysicalPagesScatter.

Originally posted by Windows Internals
To allow a 32-bit process to allocate and access more physical memory than can be represented in its limited address space, Windows provides a set of functions called Address Windowing Extensions (AWE). For example, on a Windows 2000 Advanced Server system with 8 GB of physical memory, a database server application could use AWE to allocate and use perhaps 6 GB of memory as a database cache.

Also, when [data] execution protection [(DEP)] is enabled on 32-bit Windows, the system automatically boots in PAE mode (automatically selecting the PAE kernel, \Windows\ System32\Ntkrnlpa.exe). For a description of PAE, see the section “Physical Address Extension (PAE).”

AWE Example

Key differences between rolling shutter and frame (global) shutter


Some types of CCD image sensors, such as the interline CCDs used by most PGR Imaging Products, provide an electronic shutter mechanism known as a frame (or global) shutter. In imagers that use a frame shutter, the entire imager is reset before integration to remove any residual signal in the sensor wells. The wells (pixels) then accumulate charge for some period of time, with the light collection starting and ending at exactly the same time for all pixels. At the end of the integration period (time during which light is collected), all charges are simultaneously transferred to light shielded areas of the sensor. The light shield prevents further accumulation of charge during the readout process. The charges are then shifted out of the light shielded areas of the sensor and read out.

This means that with a frame shutter sensor, the scene will be “frozen” in time, provided that the integration time is short enough i.e. there is no motion blur. An example of an image taken using a frame shutter is below.

The rolling shutter in a CMOS image sensor works differently, in that the photodiodes (pixels) do not collect light at the same time. All pixels in one row of the imager collect light during exactly the same period of time, but the time light collection starts and ends is slightly different for each row. The top row of the imager is the first one to start collecting the light and is the first one to finish collecting. The start and end of the light collection for each following row is slightly delayed. The total light collection time for each row is exactly the same, and the delay between rows is constant.

The time delay between a row being reset and a row being read is the integration time. By varying the amount of time between when the reset sweeps past a row and when the readout of the row takes place, the integration time can be controlled. Since the integration process moves through the image over some length of time, some motion blur may become apparent. An example of an image taken using a rolling shutter is below.