Embedded Windows CE [wince 5.0 vs 6.0 ]

1.1 Intro:
This article is related to windows CE 5.0 & 6.0 . Windows CE is Microsoft’s latest version of OS is 6.0. CE 6 has undergone architecture changes from earlier versions of OS.

1.2 Intended Audience:
The readers need to know the background of Windows CE OS from Microsoft. At least good amount of exp in the Windows CE Embedded domain 🙂

Please provide your comments, based on your comments will modify/add as per your request.

1.3 Aim & Glossary:

1.3.1 Aim

This article will explain the differences between Ce 5.0 and 6.0.

This is very high level; please consult appropriate documents, before porting or exploring further.

1.3.2 Glossary

Windows CE 6.0 –> CE6, Wince6.0, Wince6, Ce 6
Windows CE 5.0 –> CE5, Wince5.0, Wince5, CE 5

1.4 Reference:
For writing this article I have referred various articles. Some of the images may be proprietary of the owners.

1.5 Various Versions:

WIN CE 6.0 is used in “Windows CE Embedded”. “Windows Mobile” still uses 5.0.

It is tricky and complicated to understand the Microsoft OS in first place *..

The figure shows the Windows CE OS Architecture lay-out.

You need be noble prize winner, to understand why they came up with complex process of learning [required] from version x.0 to y.0 * . and also you will find loads of different architectures and usage **

1.6: Embedded OS VS Mobile OS

1.6.1 What is Windows Embedded OS? Windows Embedded is a set of operating systems and tools that allow you to build your embedded device with a rich set of componentized technologies.

The Windows Embedded family of products includes Windows Embedded CE, Windows XP Embedded, and Windows Embedded for Point of Service. Windows Embedded CE is a modular real-time embedded operating system for small footprint and mobile 32-bit intelligent and connected devices

1.6.2 What is Windows Mobile OS? Windows Mobile is a platform for mobile devices based on Windows Embedded CE, and used in a wide variety of third-party hardware such as personal digital assistants (PDAs) and smart phones. Visual Studio and the Windows Mobile SDK make it possible to create software for the Windows Mobile platform in both native code (Visual C++) and managed code (Visual C#, Visual Basic .NET). Windows Mobile 6 is a platform for mobile devices, based on Windows CE 5.0

1.7 Some of the differences at high-level [ Ce 5.0 VS Ce 6.0]

1.7.1. 32 MB –> 1GB process change
1.7.2. 32 process –> 32000 (or less)
1.7.3. Kernel rearrangement
1.7.4. *.exe –> dll (device,filesys, gwes)
1.7.5. Kernel/OAL/KITL split
1.7.6. Driver Interface change [Memory Marshalling requirements]
1.7.7. Deprecated API’s
1.7.8. Slot-0 [32 MB] –> 2GB Memory

1.8 OS changes:

MS$ claims it is very easy to do the porting [5.0 –> 6.0]. They have changed quite a lot. They claim this is third kernel change from last 10 years.

In CE 6.0 as shown in the figure the kernel has GWES, file systems, drivers in dll format. The ce5 has them in user space, as exe files.

Shell.exe is still in user space in CE 5 as well as Ce6.

Kernel & user space has 2GB memory layout in both Ce5 and CE6. The total size is 4GB in CE6 and CE5.

33 slots concept with 32 MB each memory and 32 process in Ce5 has discontinued fom CE6 onwards.

Now in CE6 each process can occupy 1GB Virtual memory. It can support up to 32,000 processes. You can see the comparison of CE6 and CE5.

1.8 Driver changes:

Driver can be in kernel as well as in user mode. Kernel mode drivers will become part of device.dll

If the drivers are written user mode, then they will become part of the udevice.exe.

Both drivers (driver.dll, driver.exe) need to undergo some changes and also recompilation required, if you are porting from earlier versions to latest.

The reasons are:
. Deprecated API’s (some API’s like SetKMode are not supported in CE6)
. Due to GWES, filesystem, and other drivers are moved in to Kernel, memory passing, inter process communication, buffer passing will be complicated in Ce6. We need to do “memory marshalling” (Explanation of “Memory marshalling” is out of scope

1.9 Unified Kernel:

In Ce5 filesystem, gwes, devices are in the form of executable. In Ce6, they have become part of Kernel (in form of dll’s )

(CE5) filesys.exe –> (CE6) Filesys.dll
(CE5) gwes.exe –> (CE6) gwes.dll
(CE5) device.exe –> (CE6) device.dll

1.9 coredll.dll, K.coredll.dll :

In CE6, Kernel is supported by k.coredll.dll. The old Coredll is still available, it will used in user mode.

1.10 Kernel/OAL separation:

CE5 –> OAl, Kernel will make nk.exe.
CE6 –> OAL, Kernel are separated to reduce re-compilation of them incase Kernel is changed by Microsoft.

In CE6 KITL is also separated from OAL and Kernel. Now we have oal.exe, kernel.dll, kitl.dll).

Kernel and OAL will have separate “Global parameters” [OEM Global, NkGlobal ]for information sharing.

1.11 Differences between windows ce 5.0 and windows ce 6.0:

The following is comparison between CE6/CE5 and have added reasons section to explain more.

1.11.1. Process Switching:
a. Wince 6.0: In Windows Embedded CE 6.0, File system.exe, GWES.exe, and Device.exe have become libraries which are loaded into the kernel. Now that they are libraries, there is no process switch between them
b. Win CE 5.0: File system.exe, GWES.exe, and Device.exe

1.11.2. Memory Modifications
a. Wince 6.0: 2 GB of virtual memory for each process.
b. Win CE 5.0: 32 MB of virtual memory for each process
Reason: Addresses a well-known limitation of the OS, and improves comparison with other competing systems

1.11.3. Memory API Modifications
a. Wince 6.0: Limit of more than 32,000 processes.
b. Win ce 5.0: Limit of 32 processes.
Reason: Addresses a well-known limitation of the OS, and improves comparison with other competing systems

1.11.4. Kernel API Modifications
a. Wince 6.0: Optimized system call performance by moving Device Manager, the file system, and the Graphics, Windowing, and Event Subsystem (GWES) into the kernel.
b. Win ce 5.0: Non-optimal performance of system calls.
Reason: Enhances overall system performance. At times, Windows CE 5.0 system calls were up to 40 percent slower than the equivalent system call on a Windows-based desktop platform

1.11.5. Launch Sequence of Kernel
a. Wince 6.0: Prior to Windows Embedded CE 6.0, the kernel was hard-coded to launch filesys.exe as the second process. Beyond that, the starting order of system processes and applications was controlled by registry settings under HKEY_LOCAL_MACHINE\Init. Now that most of the system processes have been converted to DLLs that load inside the kernel process, the system uses a mechanism that supports both DLLs and executables.
b. Win ce 5.0: Refer above
Reason: Enables the kernel and the OAL to be updated separately by OEMs.

1.11.6. Kernel API Modifications
a. Wince 6.0: Each process has its own unique handle values.
b. Win ce 5.0: Handles from one process can be used in another process.
Reason: Improves system security by preventing process from using handles that do not belong to them.

1.11.7. SetKMode
a. Wince 6.0: In Windows Embedded CE 6.0, kernel mode means running inside the kernel as a kernel thread.
b. Win CE5.0: Before CE 6.0, kernel mode essentially meant that you called SetKMode.

1.11.8 COM and DCOM, Export Wizard, File Viewers, IEEE 1394, Inbox, Native Wi-Fi
Peer-to-Peer Networking, Pocket Internet Explorer’s Wizard, x86 Emulator
a. Wince 6.0: Not available
b. Win ce 5.0: Available
Reason/explanation: TBD Distributed COM (DCOM), sometimes also referred to as COM Remoting, is not included in CE 6.0. CE 6.0 does not support native Wi-Fi. Peer-to-Peer Networking (P2P) has been removed from Windows Embedded CE 6.0. CE 6.0 no longer includes the Pocket Internet Explorer browser.
The catalog items corresponding to the SYSGEN_PIE and SYSGEN_WEBVIEW variables have been removed. If you set the SYSGEN_HELP variable, you must now set the SYSGEN_IE or the SYSGEN_IESAMPLE variable to achieve an effect. The SDK Wizard has been removed from CE 6.0. The SDK Wizard has been replaced by the SDK development tool accessed through Visual Studio. The x86 emulator has been removed from CE 6.0. Instead, Windows Embedded CE includes a new Device Emulator that emulates the operational behavior of a target device based on an ARM microprocessor.

1.12 Some refernces
1. Microsoft Developer: Sue Loh http://blogs.msdn.com/ce_base/archive/tags/Author_3A00_+Sue+Loh/default.aspx

2. Windows CE Microsoft Base team: http://blogs.msdn.com/ce_base/default.aspx

* Because there are many versions and product lines, are released by various different verticals in Microsoft. They try to exist frame work add/delete some of the components to make their own version/product line. Explanation this will be covered in different blog

** Embedded, Mobile, PPC, Smart Phones, STB’s, thin client, Auto PC, PMC, Control Panel, Robots etc.

[Initial article is created to explain in in Windows CE Orkut forum. Dec 4th 2008. Location Hyderabad]


2 thoughts on “Embedded Windows CE [wince 5.0 vs 6.0 ]

  1. Hi,Under sub-section 1.7.1 you said 32 MB –> 1GB process change is there.AGain, under sub section Slot-0 [32 MB] –> 2GB Memory.I think the user process has got only 1GB right ?If, I am wrong please correct me.

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s