SOFTWARE ARCHITECT MICROSOFT CORPORATION BLOGS.MSDN.COM/MIKEHALL

Similar documents
VIGNESH DORAISWAMY PRINCIPAL CONSULTANT AXIOM ETC

Rudi Swiontek Dipl. Inf. MCTS Senior Trainer and Developer. HILF!GmbH Bajuwarenring Oberhaching

Zilog Real-Time Kernel

ZiLOG Real-Time Kernel Version 1.2.0

Real-time for Windows NT

Introduction to Real-Time Operating Systems

WinCE for LPC3250. BUMMS China Nov PDF created with pdffactory Pro trial version

CSE 237A Middleware and Operating Systems. Tajana Simunic Rosing Department of Computer Science and Engineering University of California, San Diego.

Developing In The Cloud

Last 2 Classes: Introduction to Operating Systems & C++ tutorial. Today: OS and Computer Architecture

embos Real-Time Operating System embos plug-in for IAR C-Spy Debugger Document: UM01025 Software Version: 3.1 Revision: 0 Date: May 3, 2018

Porting WinCE 5.0 to your NXP BlueStreak MCU Board

RTX64 Features by Release

embos Real-Time Operating System embos plug-in for IAR C-Spy Debugger Document: UM01025 Software Version: 3.0 Revision: 0 Date: September 18, 2017

Operating Systems (2INC0) 2018/19. Introduction (01) Dr. Tanir Ozcelebi. Courtesy of Prof. Dr. Johan Lukkien. System Architecture and Networking Group

MICROKERNEL CONSTRUCTION 2014

REAL TIME OPERATING SYSTEM PROGRAMMING-I: VxWorks

CSE 4/521 Introduction to Operating Systems. Lecture 29 Windows 7 (History, Design Principles, System Components, Programmer Interface) Summer 2018

Module 3: Kernel Features

LatencyMon has been analyzing your system for 0:09:55 (h:mm:ss) on all processors.

... Lecture 10. Concepts of Mobile Operating Systems. Mobile Business I (WS 2017/18) Prof. Dr. Kai Rannenberg

CSCE Introduction to Computer Systems Spring 2019

Course Introduction. Purpose: Objectives: Content: 27 pages 4 questions. Learning Time: 20 minutes

Real-Time Programming

Processes. 4: Threads. Problem needs > 1 independent sequential process? Example: Web Server. Last Modified: 9/17/2002 2:27:59 PM

DSP/BIOS Kernel Scalable, Real-Time Kernel TM. for TMS320 DSPs. Product Bulletin

Outline. Process and Thread Management. Data Structures (2) Data Structures. Kernel Process Block (PCB)

Process and Thread Management

Unit OS2: Operating System Principles. Windows Operating System Internals - by David A. Solomon and Mark E. Russinovich with Andreas Polze

Multithreading Application in Win32

Interrupt-Driven Digital Control

Operating Systems CMPSCI 377 Spring Mark Corner University of Massachusetts Amherst

Stellaris Robotic Evaluation Board and Micriµm µc/os-iii

Windows Server Discussion with BCIU. Kevin Sullivan Management TSP US Education

COPYRIGHTED MATERIAL. Contents. Chapter 1: Windows Embedded CE 1. Chapter 2: Development Environment and Tools 15. Introduction

Module 8: Customizing the OS Design

Windows Embedded CE 6.0. Windows Embedded CE 6.0. Victor Lin #2231

RTX64 Features by Release IZ-DOC-X R3

What s Wrong with the Operating System Interface? Collin Lee and John Ousterhout

Final Examination. Thursday, December 3, :20PM 620 PM. NAME: Solutions to Selected Problems ID:

Microsoft RemoteFX for Remote Desktop Virtualization Host Capacity Planning Guide for Windows Server 2008 R2 Service Pack 1

Windows Embedded Compact Test Kit User Guide

Efficiency and memory footprint of Xilkernel for the Microblaze soft processor

Outline Background Jaluna-1 Presentation Jaluna-2 Presentation Overview Use Cases Architecture Features Copyright Jaluna SA. All rights reserved

Name: Vijay Rajagopalan Title : Principal Architect Company : Microsoft Corporation Session Code:

OVERVIEW. Last Week: But if frequency of high priority task increases temporarily, system may encounter overload: Today: Slide 1. Slide 3.

Multi-core Programming Evolution

Behavior and performance evaluation of Windows Embedded Compact 7 on ARM

Frequently Asked Questions about Real-Time

An Automatic Temperature Control System Using RZK

Operating System. Operating System Overview. Structure of a Computer System. Structure of a Computer System. Structure of a Computer System

Review: Easy Piece 1

How to get realistic C-states latency and residency? Vincent Guittot

How Linux RT_PREEMPT Works

Arachne. Core Aware Thread Management Henry Qin Jacqueline Speiser John Ousterhout

CS3MH3/6MH3 Final 2005 Page 1 COMP SCI 3MH3/6MH3. Day Class Duration of examination: two hours McMaster University Final Examination April 2005

Hacking Windows CE.

Windows Server Upgrade tips and tricks. Winnie Leung Technology Specialist Microsoft Corporation

Container Adoption for NFV Challenges & Opportunities. Sriram Natarajan, T-Labs Silicon Valley Innovation Center

RTOS, Linux & Virtualization Wind River Systems, Inc.

2 nd Half. Memory management Disk management Network and Security Virtual machine

Commercial Real-time Operating Systems An Introduction. Swaminathan Sivasubramanian Dependable Computing & Networking Laboratory

The Kernel. wants to be your friend

Introduction to Embedded Bootloader. Intel SSG/SSD/UEFI

Programming in C# Jump Start. Jerry Nixon Microsoft Developer Evangelist Daren May President & Co-founder, Crank211

DEVICE DRIVERS AND INTERRUPTS SERVICE MECHANISM

Interrupt response times on Arduino and Raspberry Pi. Tomaž Šolc

Putting it All Together

REAL TIME OPERATING SYSTEMS: A COMPLETE OVERVIEW

ecos in commercial use the Sinar emotion Outline

Administration. Matteo Corti RZ H

Implementing and Supporting Windows Intune

Windows Embedded Compact Test Kit User Guide 1

Lab 8 Real-time OS - 1

Motivation. Threads. Multithreaded Server Architecture. Thread of execution. Chapter 4

CSCE Introduction to Computer Systems Spring 2019

Mobile Operating Systems Lesson 01 Operating System

OS lpr. www. nfsd gcc emacs ls 1/27/09. Process Management. CS 537 Lecture 3: Processes. Example OS in operation. Why Processes? Simplicity + Speed

Virtualization And High Availability. Howard Chow Microsoft MVP

ECE 498 Linux Assembly Language Lecture 1

Preemptive Scheduling

Lesson 5: Software for embedding in System- Part 2

Memory Management. Disclaimer: some slides are adopted from book authors slides with permission 1

Process Scheduling Queues

Distributed Systems Operation System Support

Pro Windows Embedded Compact 7

CEC 450 Real-Time Systems

Lecture notes Lectures 1 through 5 (up through lecture 5 slide 63) Book Chapters 1-4

Multi-core Architecture and Programming

Evaluation of Real-time Performance in Embedded Linux. Hiraku Toyooka, Hitachi. LinuxCon Europe Hitachi, Ltd All rights reserved.

2007 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or

From last time. What is the maximum size of a file in bytes? What is the maximum total size of directories and files in a single disk partition?

ELEC 377 Operating Systems. Week 1 Class 2

Inter-Process Communication and Synchronization of Processes, Threads and Tasks: Lesson-1: PROCESS

Capriccio : Scalable Threads for Internet Services

Implementing and Supporting Windows Intune

6/20/2018. Lecture 2: Platforms & RTOS. Outline. Lab Setup (20 min) Labs work. Lecture: Platform + RTOS

CIT 480: Securing Computer Systems. Operating System Concepts

AUTOBEST: A United AUTOSAR-OS And ARINC 653 Kernel. Alexander Züpke, Marc Bommert, Daniel Lohmann

2008 Chapter-8 L1: "Embedded Systems - Architecture, Programming and Design", Raj Kamal, Publs.: McGraw-Hill, Inc.

Transcription:

MIKE HALL SOFTWARE ARCHITECT MICROSOFT CORPORATION MIKEHALL@MICROSOFT.COM BLOGS.MSDN.COM/MIKEHALL

Windows CE Backgrounder Windows Embedded CE Architecture Real-Time Architecture Tools and Application Development Q&A

CONFIGURE AND O/S IMAGE, AND BUILD WE WILL COME BACK TO THE BUILD PROCESS LATER IN THE SESSION.

Alder Windows CE 1.0 11/1996 Cedar Windows CE 3.0 4/2000 Macallan Windows CE 5.0 8/2004 Tomatin NMD FP CE 6.0 R2 SP1 2.11 Birch Windows CE 2.0 11/1997 SP2 2.12 Jameson 4.1 Talisker Windows CE.NET 4.0 1/2002 McKendric 4.2 Yamazaki Windows CE 6 H2/2006

Windows Embedded CE 6.0 is NOT Windows Mobile 6.0 (based on CE 5.0) Windows Embedded CE 6.0 is 32-bit, real-time, multitasking OS Highly componentized (~ 700 components in CE 6.0) Delivered as a granular set of components Use CE 6.0 Platform Builder tools to configure image Scalable Footprint scales with functionality selected Wide variety of CPU support Runs on x86, ARM, MIPS and SH4

Kernel Large Memory Area Used for Memory Mapped Files Process Limited to 64M Address Space Reserved Process` Active Process Application Space

2 GB Kernel Space Kernel Large Memory Area Single 2 GB VM for all Processes Slot 32 Slot 31 : : Slot 7 Slot 6 Slot 5 Slot 4 Slot 3 Slot 2 Slot 1 ROM DLLs Slot 0 Execution 31 Slots for Processes Execution Slot

2 GB Kernel Space Kernel Filesystem GWES Drivers 2 GB per Process Process Code User VM 32 K Process

2 GB of Virtual Memory per process 32K processes 64K Global Handle Table Unified Kernel Critical OS components moved into kernel space Improved system performance Increased security and robustness High degree of application compatibility

User Space 2 Gigabytes Each process has its own mapping 0x80000000 0x40000000 Shared System Heap 255 MB RAM Backed Mapfiles 256 MB Shared User DLLs 512 MB Used for OS / App communication RAM Backed Mapfiles All DLLs code and data Process space 1 GB per process Executable code and data VM Allocation 0x00000000 Page 10

Shell Services Manager Services UM Driver Manager User Mode Drivers Applications Applications User Mode OS DLLs (Coredll, Winsock, CommCtrl, ) Kernel.DLL NK.EXE Bootloader KCoredll.DLL FileSys.DLL GWES.DLL Hardware Device.DLL Kernel Drivers Kernel Mode Page 11

Two driver types supported Kernel Mode for performance User Mode for robustness Minimal effort to port existing CE 5.0 drivers 1-3 Days effort per driver The overall structure of drivers remains the same Main changes are in how the drivers access client memory No SetKMode or SetProcPermissions CEAppCompat tool to check existing driver/applications

Respond time test using the following configuration Samsung SMDK2410 development board 200 mhz ARM with 16x16 cache Windows CE 5.0 with full UI Running a WMV video Windows CE Real-Time Test Results ISR starts IST starts Minimum 1.2 µs 31.7 µs Average 3.3 µs 67.2 µs Maximum 13.3 µs 103.0 µs Time in microseconds (µs)

ILTiming & OS Bench ILTiming Software-based real-time measurement tool Measures both ISR and IST latencies ISR latency From IRQ to ISR IST latency From the end of the ISR to the start of the IST Enabled for all sample platforms Varying system loads OSBench Scheduler performance-timing tests Enables you to determine how long it takes to perform a basic kernel tasks such as Acquire or release a critical section Wait or signal an event Create a semaphore or mutex Yield a thread Call system APIs

Windows CE 6.0 has 256 levels of priority Level 0 is the highest and 255 is the lowest The old CE model (< CE 3.0) of 8 levels now map to the lowest 8 of the new model The default thread priority is 252 SetThreadPriority = 251 Levels 0 through 248 can be reserved by OEM Levels Description 0 through 96 Real-time above drivers 97 through 152 Default used by CE device drivers 153 through 247 Real-time below drivers 248 through 255 Non-real-time priorities

IST Latency IST Thread ISR 1 ISR N ISR Latency ISR ID OAL ISR All Higher Enabled Set Event All Except ID All Kernel HW

IST IST ISR 1 ISR N ISR I D OAL // Create the Event gintevent = CreateEvent( NULL, // Security FALSE, // Manual reset FALSE, // Init as not signaled NULL // No Named Events ); // Create a thread that waits for signaling gthreadint = CreateThread( NULL, // Security 0, // Default ThreadInt,// Interrupt Thread NULL, // No Parameters CREATE_SUSPENDED,// Suspended &dwthreadid // Thread Id); // Initilialize the Interrupt gsysinterruptnum = KernelIoControl( IOCTL_HAL_TRANSLATE_IRQ, &girqnum, sizeof(dword), &gsysintnum, sizeof(dword), NULL ); ISR All Higher Enabled Set Event All Except ID All Kernel HW InterruptInitialize( gsysintnum, // From Map gintevent, // Global Event NULL, // Not Used (DWORD)NULL // Not Used ) ) // Get the thread going ResumeThread( gthreadint );

IST IST ISR 1 ISR N ISR I D OAL DWORD WINAPI ThreadInt( LPVOID lpvparam ) { // The magic thread waits for the event. while( grun ) { // Wait until we have been signaled interrupt WaitForSingleObject( gintevent, INFINITE ); ISR All Higher Enabled Set Event All Except ID All Kernel HW // Increment the counter ginterruptcount ++; // Run your logic here } // Reset the interrupt InterruptDone( gsysintnum ); } return 0;

Shows interaction between processes, threads, and interrupts Track interrupts TLB misses Priority inversion Thread state such as running, blocked, sleeping, and migrating

Remote Tools: Call Profiler, Performance Monitor, Registry Editor, CeDebugX Zoomin, Remote Kernel Tracker App Dev VS 2005/2008 O/S Dev VS 2005 + PB Configure Build Download Debug (source) Test (CETK) Applications

DEPLOY AND DEBUG KERNEL SOURCE

Used in a range of interesting devices PND, Industrial Pig Slicers, IA, Robots, Portable Ultrasound, more Small footprint, real time, embedded operating system Multiple processor architectures supported Choice of development languages/frameworks Great Tools! Labs and Sessions at ESC Silicon Valley More information available at: http://msdn.microsoft.com/embedded

2008 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.