Programming Microsoft Windows Ce Net 3Rd [Electronic resources] نسخه متنی

اینجــــا یک کتابخانه دیجیتالی است

با بیش از 100000 منبع الکترونیکی رایگان به زبان فارسی ، عربی و انگلیسی

Programming Microsoft Windows Ce Net 3Rd [Electronic resources] - نسخه متنی

| نمايش فراداده ، افزودن یک نقد و بررسی
افزودن به کتابخانه شخصی
ارسال به دوستان
جستجو در متن کتاب
بیشتر
تنظیمات قلم

فونت

اندازه قلم

+ - پیش فرض

حالت نمایش

روز نیمروز شب
جستجو در لغت نامه
بیشتر
لیست موضوعات
توضیحات
افزودن یادداشت جدید






Chapter 7.


Figure 21-1: A diagram of the lower half of the Windows CE memory map

When a thread in a process is running, the slot of the process that owns the thread is cloned into slot 0. This is not a copy of the original slot; instead, the operating system manipulates the page table entries of the CPU to map the physical memory into the virtual space at both the original slot and slot 0. Because of this cloning, any change to slot 0 is also reflected in the process's original slot. Application threads by default have access rights to their own slot and slot 1. When a thread in another process runs, its process slot is mapped into slot 0. Because of this swapping, processes assume that they are always running in slot 0 since any time they are running they are in slot 0 and when they aren't running, it really doesn't matter that they aren't in slot 0.

The region of the address space above the 33 slots and below 32 MB under the 2-GB boundary is used by the operating system for mapping memory-mapped files. The final user-mode area just below the 2-GB boundary is where Windows CE 4.2 or later loads resource-only DLLs. Figure 21-1 shows the layout of the bottom 2 GB of the system address space.

The address space above the 2-GB boundary, addresses 8000 0000 through FFFF FFFF, is reserved for the operating system and isn't accessible to applications and drivers running in user mode. However, many Windows CE systems, including the Pocket PC, always run in kernel mode. Staying in kernel mode all the time removes the time needed to transition between user and kernel mode, which improves performance.

The upper 2 GB of kernel space is divided into four regions. The first 512MB memory region, from addresses 8000 0000 to A000 0000, is linearly mapped to the first 512 MB of the physical address space. So reading address 8000 1234 in kernel mode is a read of physical address 0000 1234. Memory accesses through this window are cached in the CPU's data cache to improve performance.

The second 512-MB region, from A000 0000 through BFFF FFFF, is also mapped to the first 512 MB of the physical memory space. The difference between this window and the window at 8000 0000 is that accesses through the A000 0000 window are not cached. While the performance is slower through this window, the noncached access is necessary when you read registers in devices that might change independently of the execution of the CPU.

The remaining area, from C000 0000 to the top of the memory space at FFFF FFFF, is used by the kernel. This area includes a space at C200 0000, where the kernel, NK.exe, was moved when the memory space was reorganized with the release of Windows CE .NET 4.0. Figure 21-2 shows the layout of the full 4-GB address space.


Figure 21-2: A diagram of the entire 4-GB Windows CE memory map

/ 169