© 2003 Wayne Wolf Overheads for Computers as Components Operating systems zWindows CE (WinCE).

Slides:



Advertisements
Similar presentations
Windows CE Real-Time Performance Architecture
Advertisements

Device Drivers Witawas Srisa-an Embedded Systems Design and Implementation.
Optimizing Windows ® CE For Real-Time Systems Paul Yao President The Paul Yao Company
Chapter 2 How Hardware and Software Work Together.
MHK200 Module 1: Introduction to Windows CE. MHK200 Overivew Windows CE Design Goals Windows CE Architecture Supported Technologies, Libraries, and Tools.
Windows XP Operating Systems  COSC513 Operating Systems  Mr. Nut Prommongkonkun  Student ID #
Memory Protection: Kernel and User Address Spaces  Background  Address binding  How memory protection is achieved.
11/13/01CS-550 Presentation - Overview of Microsoft disk operating system. 1 An Overview of Microsoft Disk Operating System.
Contiki A Lightweight and Flexible Operating System for Tiny Networked Sensors Presented by: Jeremy Schiff.
Lesson 15 – INSTALL AND SET UP NETWARE 5.1. Understanding NetWare 5.1 Preparing for installation Installing NetWare 5.1 Configuring NetWare 5.1 client.
INTRODUCTION OS/2 was initially designed to extend the capabilities of DOS by IBM and Microsoft Corporations. To create a single industry-standard operating.
Home: Phones OFF Please Unix Kernel Parminder Singh Kang Home:
Embedded Real-time Systems The Linux kernel. The Operating System Kernel Resident in memory, privileged mode System calls offer general purpose services.
Chapter 13 Embedded Systems
OS Spring’03 Introduction Operating Systems Spring 2003.
1 Operating Systems Ch An Overview. Architecture of Computer Hardware and Systems Software Irv Englander, John Wiley, Bare Bones Computer.
The Design of Robust and Efficient Microkernel ManRiX, The Design of Robust and Efficient Microkernel Presented by: Manish Regmi
Operating Systems Concepts 1. A Computer Model An operating system has to deal with the fact that a computer is made up of a CPU, random access memory.
I/O Tanenbaum, ch. 5 p. 329 – 427 Silberschatz, ch. 13 p
Future Directions For The Windows CE Operating System Architecture John Hatch Program Manager.
NET+OS 6.1 Training. BSP NET+OS 6.1 BSP Initialization Memory map New features Debugging Porting Issues.
Programming mobile devices Part II Programming Symbian devices with Symbian C++
Chapter 3.1:Operating Systems Concepts 1. A Computer Model An operating system has to deal with the fact that a computer is made up of a CPU, random access.
Chapter 3 Operating Systems Introduction to CS 1 st Semester, 2015 Sanghyun Park.
1 CS503: Operating Systems Part 1: OS Interface Dongyan Xu Department of Computer Science Purdue University.
© 2004 Wayne Wolf Overheads for Computers as Components Operating systems zWindows CE files. zWindows CE databases. zWindows CE processes.
Chapter 8 Windows Outline Programming Windows 2000 System structure Processes and threads in Windows 2000 Memory management The Windows 2000 file.
hardware and operating systems basics.
High Performance Embedded Computing © 2007 Elsevier Chapter 4, part 2: Processes and Operating Systems High Performance Embedded Computing Wayne Wolf.
High Performance Embedded Computing © 2007 Elsevier Lecture 14: Real Time Concepts Embedded Computing Systems Mikko Lipasti Based on slides and textbook.
2001 Networking Operating Systems (CO32010) 1. Operating Systems 2. Processes and scheduling 3.
What is an Operating System? The OS is a program – Permit easy access, control hardware, communicate between user and software, user and hardware, software.
Real-Time Systems Design1 Priority Inversion When a low-priority task blocks a higher-priority one, a priority inversion is said to occur Assume that priorities:
Windows 2000 Course Summary Computing Department, Lancaster University, UK.
E X C E E D I N G E X P E C T A T I O N S OP SYS Linux System Administration Dr. Hoganson Kennesaw State University Operating Systems Functions of an operating.
Operating Systems Lecture November 2015© Copyright Virtual University of Pakistan 2 Agenda for Today Review of previous lecture Hardware (I/O, memory,
January 10, Kits Workshop 1 Washington WASHINGTON UNIVERSITY IN ST LOUIS A Smart Port Card Tutorial --- Software John DeHart Washington University.
Kernel Architecture Process Management Memory Management.
ECGR-6185 µC/OS II Nayana Rao University of North Carolina at Charlotte.
We will focus on operating system concepts What does it do? How is it implemented? Apply to Windows, Linux, Unix, Solaris, Mac OS X. Will discuss differences.
System Components ● There are three main protected modules of the System  The Hardware Abstraction Layer ● A virtual machine to configure all devices.
Lecture 5 Rootkits Hoglund/Butler (Chapters 1-3).
Overview of Windows Driver Development Reference: us/gstart/hh/gstart/gs_intro_031j.asp.
Microsoft Window 9X Operating System Richard Goldman © February 28, 2001.
Embedded Real-Time Systems Processing interrupts Lecturer Department University.
Outlines  Introduction  Kernel Structure  Porting.
Chap. 4 ARM Boot Loader Internals. 2 S3C2500 ARM940T Core module ARM9TDMI CoreIC.
Introduction to Operating Systems Concepts
Computer System Structures
REAL-TIME OPERATING SYSTEMS
Current Generation Hypervisor Type 1 Type 2.
CS501 Advanced Computer Architecture
Windows 95 & 98 Steve Boyle Mike Forster Maggie Hamill Nancy O’Brien.
Thread Fundamentals Header Advanced .NET Threading, Part 1
KERNEL ARCHITECTURE.
Chapter 3: Windows7 Part 2.
Windows Development Dynadata Copyright, 2014 © DynaData S.A. 1/10.
Windows Internals Brown-Bag Seminar Chapter 1 – Concepts and Tools
I/O Systems I/O Hardware Application I/O Interface
Chapter 3: Windows7 Part 2.
Module 1: Introduction to Windows CE
Today’s agenda Hardware architecture and runtime system
Lecture Topics: 11/1 General Operating System Concepts Processes
Computer Organization
Operating Systems Lecture 3.
February 5, 2004 Adrienne Noble
Virtual Memory Use main memory as a “cache” for secondary (disk) storage Managed jointly by CPU hardware and the operating system (OS) Programs share main.
Overview of System Development for Windows CE.NET
Michael Blinn Ben Hejl Jane McHugh Matthew VanMater
Chapter 13: I/O Systems “The two main jobs of a computer are I/O and [CPU] processing. In many cases, the main job is I/O, and the [CPU] processing is.
Presentation transcript:

© 2003 Wayne Wolf Overheads for Computers as Components Operating systems zWindows CE (WinCE).

© 2003 Wayne Wolf Overheads for Computers as Components Goals zSupport lightweight consumer devices: yPDAs. ySet-top boxes. zSimplify porting existing Windows applications to the new platforms.

© 2003 Wayne Wolf Overheads for Computers as Components WinCE architecture OEM hardware OAL bootload drivers Device drivers File drivers Network drivers Kernel library GWES Device manager File manager IrDATCP/IP Win32 APIs WinCE shell services Embedded shell Remote connectivity Applications

© 2003 Wayne Wolf Overheads for Computers as Components Virtual memory zWinCE uses virtual memory. yMost devices don’t have disk drive. zCode can be paged from ROM, etc. zWinCE suports a flat 32-bit virtual address space. zVirtual address may be: yStatically mapped (kernel-mode code). yDynamically mapped (user-mode and some kernel- mode code).

© 2003 Wayne Wolf Overheads for Computers as Components Address space zBottom half is user space. zTop half is kernel space. User space 2 GB Kernel space 2 GB

© 2003 Wayne Wolf Overheads for Computers as Components Kernel address space zOperating system (nk.exe). zStatically mapped virtual addresses. yUp to 512 MB of physical resources can be statically mapped. zControl of static mapping varies: yOEM control for ARM and x86. yCPU control for SHx and MIPS.

© 2003 Wayne Wolf Overheads for Computers as Components User address space z64 slots of 32 MB each. zSlot 0 is currently running process. zSlots 1-33 are the processes. y32 processes max. zObject store, memory mapped files, resource mappings. Slot 0: current process Slot 1: DLLs Slot 2: process Slot 3: process … Slots 33-62: object store, memory mapped files Slot 63: resource mappings

© 2003 Wayne Wolf Overheads for Computers as Components Process slot zIncludes code, DLL and virtual allocations. zVirtual allocations are 64 KB-aligned; 4KB pages can be committed within an allocation. zMovement: yDLL allocations start at the top and grow down. yProcess and general allocations start at the bottom and grow up. Guard section (64K) User code: Stack, heap per thread DLL virtual memory allocations

© 2003 Wayne Wolf Overheads for Computers as Components API calls zSystem call may be to DLL, another EXE. zCOREDLL provides link between system API and EXE. zSystem call: yException caught by kernel. yKernel determines which EXE gets the call.

© 2003 Wayne Wolf Overheads for Computers as Components Driver structure zA driver is a DLL with particular interface points. zHosted by a device manager process space (may be GWES). zHandle interrupts by dedicated IST thread. zSynchronize driver and application via critical sections and MUTEXes.

© 2003 Wayne Wolf Overheads for Computers as Components Driver architecture Device I/O RM GWES PCI busdisplay touch mouse Notification LED batterynetworkaudioFirewire USB host PCMCIA host

© 2003 Wayne Wolf Overheads for Computers as Components Device manager zAlways-running user-level process. zContains the I/O Resource Manager. zLoads the registry enumerator DLL which in turn loads drivers. zProvides power notification callbacks.

© 2003 Wayne Wolf Overheads for Computers as Components Registry enumerator zDLL (RegEum.dll). yRe-entrant, supports hierarchical usage. zDriver loading: yRegEnum scans registry, loads bus drivers. yBus driver scans bus, locates devices. ySearches registry for device information. yLoads appropriate drivers. ySends notification that interface is available.

© 2003 Wayne Wolf Overheads for Computers as Components Interrupt handling zWork divided into two sections: yInterrupt service routine (ISR): xKernel mode service. xMay be static or installable. yInterrupt service thread (IST): xUser mode thread.

© 2003 Wayne Wolf Overheads for Computers as Components Static ISR zBuilt into the kernel. ySHx and MIPS must be written in assembler, limited register availability. zOne-way communication from ISR to IST. yCan share a buffer but location must be predefined. zNested ISR support based on CPU, OEM’s initialization. zStack is provided by the kernel.

© 2003 Wayne Wolf Overheads for Computers as Components Installable ISR zCan be dynamically loaded into kernel. zLoads a C DLL. zCan use shared memory for communication. zISRs are processed in the order they were installed. zLimited stack size.

© 2003 Wayne Wolf Overheads for Computers as Components WinCE 4.x interrupts All higher enabled HW kernel OAL I-ISR thread All enabled Except ID All enabled ISHSet eventEnable ID ISR IST processing device

© 2003 Wayne Wolf Overheads for Computers as Components Kernel scheduler zTwo styles of preemptive multitasking. yThread runs until end of quantum. yThread runs until higher priority thread is ready to run. zRound-robin within priority level. zQuantum is defined by OEM and application. zPriority inheritance to control priority inversion. z256 total priorities. yTop 248 can be protected by the OEM.

© 2003 Wayne Wolf Overheads for Computers as Components Thread quantum zPer-thread quantum. yDefault set by OEM. zUse API to set quantum. zQuantum of 0 means run-to-completion.

© 2003 Wayne Wolf Overheads for Computers as Components System tick z1 ms timer tick normally. zSleep(N) will generally wake up in N to N+1 ms.

© 2003 Wayne Wolf Overheads for Computers as Components Causes of interrupt latency zISR: yAmount of time that interrupts are turned off. yTime required to vector ISR, save registers, etc. zIST: yTime spent in ISR. yTime spent in Kcall. yThread scheduling time.

© 2003 Wayne Wolf Overheads for Computers as Components Improvements to latency in WinCE 4.x zLess non-preemptable code. ySome routines split into several smaller routines. zKernel data structures moved to statically mapped virtual addresses. zSpecial-case ISTs provided. zImproved priority inversion handling.

© 2003 Wayne Wolf Overheads for Computers as Components Controlling scheduling/latency zThread scheduling: ySet priorities appropriately, choose proper quantum. zMemory: yPreallocate memory, threads, sync objects. zUnderstand device characteristics: yI/O-based access may incur a penalty. zOn x86 avoid using CMOS real-time clock, use software real-time clock. zDisable idle processing. zDisable demand paging.

© 2003 Wayne Wolf Overheads for Computers as Components Real-time measurement zILTiming ySoftware-based real-time measurement tool. xMeasures ISR latency from IRQ to ISR. xMeasures IST latency from end of ISR to start of IST. zKernel tracker yTracks interrupts, TLB misses, and priority inversion.

© 2003 Wayne Wolf Overheads for Computers as Components Board support package zCustomizes OS for a hardware platform. yDrivers, memory configuration, power management, etc. zSoftware development environment provides tools for BSP development.

© 2003 Wayne Wolf Overheads for Computers as Components BSP development process Test HW Clone Reference BSP Develop Boot loader Develop Minimal kernel Add device drivers Power management Package BSP

© 2003 Wayne Wolf Overheads for Computers as Components Boot loader zThe Boot loader loads an executable image and runs it. yLoadable by Ethernet, USB, serial, local flash, etc. yMemory may be flash or ROM. yMay need different development, production loaders.

© 2003 Wayne Wolf Overheads for Computers as Components OAL architecture Kernel (Microsoft) Hardware Real-time clock USB/ Ethernet/ Serial OAL RTC Power Mgt. interrupt functions debug