Windows95 VxD Design and Win32 Application inter face 발 표 : 노 원국 ( 컴퓨터 시스템 설계 )

Slides:



Advertisements
Similar presentations
MHK200 Module 1: Introduction to Windows CE. MHK200 Overivew Windows CE Design Goals Windows CE Architecture Supported Technologies, Libraries, and Tools.
Advertisements

Slide 3-1 Copyright © 2004 Pearson Education, Inc. Operating Systems: A Modern Perspective, Chapter 3 3 Operating System Organization.
计算机系 信息处理实验室 Leture1 concepts and tools 2005 Spring 陈香兰.
Operating Systems High Level View Chapter 1,2. Who is the User? End Users Application Programmers System Programmers Administrators.
Course Overview Introduction Computer System Structures
1 Hardware and Software Architecture Chapter 2 n The Intel Processor Architecture n History of PC Memory Usage (Real Mode)
OS Fall ’ 02 Introduction Operating Systems Fall 2002.
INTRODUCTION OS/2 was initially designed to extend the capabilities of DOS by IBM and Microsoft Corporations. To create a single industry-standard operating.
Operating System Structure. Announcements Make sure you are registered for CS 415 First CS 415 project is up –Initial design documents due next Friday,
OS Spring’03 Introduction Operating Systems Spring 2003.
1 CE6130 現代作業系統核心 Modern Operating System Kernels 許 富 皓.
Cs238 Lecture 3 Operating System Structures Dr. Alan R. Davis.
Slide 3-1 Copyright © 2004 Pearson Education, Inc. Operating Systems: A Modern Perspective, Chapter 3 Operating System Organization.
Slide 3-1 Copyright © 2004 Pearson Education, Inc. Operating Systems: A Modern Perspective, Chapter 3.
Chapter 8 Windows Outline Programming Windows 2000 System structure Processes and threads in Windows 2000 Memory management The Windows 2000 file.
Host and Application Security Lesson 4: The Win32 Boot Process.
Ceng Operating Systems
UNIX System Administration OS Kernal Copyright 2002, Dr. Ken Hoganson All rights reserved. OS Kernel Concept Kernel or MicroKernel Concept: An OS architecture-design.
Windows CE 시스템 개발 개요. 임베디드시스템소프트웨어 -Windows CE 2 Overview  Selecting a Windows Embedded Operating System  The Windows CE Platform Development Cycle.
A+ Guide to Software Managing, Maintaining and Troubleshooting THIRD EDITION Chapter 9 Managing Memory.
Overlays in MS-DOS By Andrew C. Vogan For CS /03/2002 This work complies with the JMU Honor Code.
How Hardware and Software Work Together
2001 Networking Operating Systems (CO32010) 1. Operating Systems 2. Processes and scheduling 3.
April 2000Dr Milan Simic1 Network Operating Systems Windows NT.
Windows 2000 Course Summary Computing Department, Lancaster University, UK.
Windows NT Operating System. Windows NT Models Layered Model Client/Server Model Object Model Symmetric Multiprocessing.
1 Chapter Overview How Windows 98 Works How Windows 2000 Works Managing Windows.
Slide 3-1 Copyright © 2004 Pearson Education, Inc. Operating Systems: A Modern Perspective, Chapter 3.
1 Windows 98 Ancillary Systems x The Process Scheduler provides system resources. The Windows Driver Model (WDM) allows Windows 98 and Microsoft Windows.
2003 Dominic Swayne1 Microsoft Disk Operating System and PC DOS CS-550-1: Operating Systems Fall 2003 Dominic Swayne.
Why dooroos. RTOS Requirement 2 A real-time operating system (RTOS) is an operating system (OS) intended to serve real-time application requests.operating.
LINUX System : Lecture 7 Bong-Soo Sohn Lecture notes acknowledgement : The design of UNIX Operating System.
Windows CE 시스템 개발 개요. 모바일운영체제 - Windows CE 2 Overview  Selecting a Windows Embedded Operating System  The Windows CE Platform Development Cycle  The.
Operating Systems Lecture November 2015© Copyright Virtual University of Pakistan 2 Agenda for Today Review of previous lecture Hardware (I/O, memory,
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.
Windows Environment History of Windows: Windows was announced by microsoft in november 1983 and was released in november Advantage: Windows 1.0.
System Components ● There are three main protected modules of the System  The Hardware Abstraction Layer ● A virtual machine to configure all devices.
1 Windows NT A Distributed Architecture Windows NT A Distributed Architecture Professor: Mohamed Khalil CSE 8343 GROUP-A5 Dhaval Sanghvi Amit Sharma Ali.
CSE 451: Operating Systems Winter 2015 Module 25 Virtual Machine Monitors Mark Zbikowski Allen Center 476 © 2013 Gribble, Lazowska,
1 Operating System Software What, Where, Why, and How? Startup routines ROM BIOS POST Device Drivers User Interface – Text or GUI Menus and dialog boxes.
IT Essentials 1 v3 Module 4 JEOPARDY IT Essentials 1 RouterModesWANEncapsulationWANServicesRouterBasicsRouterCommands RouterModesWANEncapsulationWANServicesRouterBasicsRouterCommands.
ISLab Flash Team Ch 3. Kernel-Mode I/O Processing.
Security Architecture and Design Chapter 4 Part 2 Pages 319 to 357.
Overview of Windows Driver Development Reference: us/gstart/hh/gstart/gs_intro_031j.asp.
Microsoft Window 9X Operating System Richard Goldman © February 28, 2001.
Course 03 Basic Concepts assist. eng. Jánó Rajmond, PhD
CITA 171 Section 1 DOS/Windows Introduction. DOS Disk operating system (DOS) –Term most often associated with MS-DOS –Single-tasking operating system.
1 Chapter 2: Operating-System Structures Services Interface provided to users & programmers –System calls (programmer access) –User level access to system.
Introduction to Operating Systems Concepts
Operating System & Application Software
Kernel Design & Implementation
An Introduction to Operating Systems
Operating System Review
Windows API.
Windows 95 & 98 Steve Boyle Mike Forster Maggie Hamill Nancy O’Brien.
Chapter 4 – Introduction to Operating System Concepts
Unit OS2: Operating System Principles
Chapter 3: Windows7 Part 1.
Operating System Review
Windows Development Dynadata Copyright, 2014 © DynaData S.A. 1/10.
Windows Internals Brown-Bag Seminar Chapter 1 – Concepts and Tools
LINUX System : Lecture 7 Lecture notes acknowledgement : The design of UNIX Operating System.
CSE 451: Operating Systems Autumn Module 24 Virtual Machine Monitors
Operating Systems: A Modern Perspective, Chapter 3
Outline Operating System Organization Operating System Examples
Operating Systems Structure
CSE 451: Operating Systems Autumn Module 24 Virtual Machine Monitors
Overview of System Development for Windows CE.NET
In Today’s Class.. General Kernel Responsibilities Kernel Organization
Introduction and Overview
Presentation transcript:

Windows95 VxD Design and Win32 Application inter face 발 표 : 노 원국 ( 컴퓨터 시스템 설계 )

목 차 History of Device Driver for Windows VxD Programming 환경 Two Scenario for VxD Programming VxD Basic Conceptio 결 론

History of Device Drivers for Windows Real-Mode Windows(DOS)  MS-DOS and System BIOS 가 Driver 제공  Software Interrup 를 이용하여 Driver Service export  Application 이 하드웨어 자원을 직접 제어  BIOS 가 Hardware Interrupt Managing  Config.sys 를 이용하여 Driver 등록 .COM and.SYS type(tiny memory model) Standard-Mode Windows(Win1.0)  Windows 는 단지 Large Graphics App 에 불과  Intel 의 출현으로 Protected Mode 가 가능  Protected Mode 는 16M 이상의 Physical Memory Access 를 가능

History of Device Drivers for Windows Standard-Mode Windows(cont ’ d)  Processor 가 Protected-Mode 와 Real-Mode 사이를 Switching 하여 Windows 가 MS-DOS 와 BIOS 를 사용할 수 있도록 하는 Mode.  Window 가 Real-Mode 로의 Switching 을 요구하지 않는 경우 발생 (Keystrokes or Mouse Motion)  Protected-Mode 에서 I/O Interrupt 를 Handle 하는 Protected-Mode Device Driver 가 요구  Mouse.Drv, Comm.Drv etc .Drv 는 16bit Ring-Three DLL  Protected-Mode 하에서, Hardware 와 Standard Windows Kernel, User, GDI Module 사이의 Interface 를 담당  MS-DOS 와 Windows 는 Processor 를 Reset(Reboot) 하여 Switch

History of Device Drivers for Windows Enhanced-Mode Windows(Win3.1)  Intel 은 Real, Protected, V86 Mode 를 지원  V86(Virtualize 80386) 은 Physical Machine 을 Virtualization  Application 은 마치 자신이 Real Machine 을 독점하여 사용하는 것 처럼 동작 (Multitask 개념 등장 )  Enhanced Mode 의 Main advantage 는 Graphical desktop 의 Window 하에서 MS-DOS 를 실행시킬 수 있다는 것  Driver 의 형태는 기존의 xxx.Drv 와 xxx.Dll, xxx.Vxd 를 Support  그러나 Disk and File I/O 는 MS-DOS and BIOS 를 사용한다.  16bit Driver 사용  진정한 32bit OS 라 할 수 없다.

History of Device Drivers for Windows Windows95  기존의 16bit Driver 와 Application 지원  Real, Protected, V86 Mode 를 지원  Ring-three Component 대신에 32bit, Ring-zero virtual Device Driver 사용 (Vxd type-32bit Device Driver)  VxD 는 Hardware 와 Application 사이의 모든 Interrupt 를 Handling 하 고 Data Transfer 를 실행  Application 은 VxD 와 Communication 을 하기 위하여 Function Call 을 사용  16bit Application 과 16bit Device Driver 의 Interface 를 위하여 Software Interrupt INT 2Fh 를 사용  32bit Application 과 32bit Device Driver 에서 Software Interrupt 사용 이 불가능

History of Device Drivers for Windows Windows95(cont ’ d)  32bit App 와 32bit Device Driver 의 Interface 는 단지 Win32 DeviceIoControl API function 사용  Windows95 는 Real Machine 의 모든 Component(Hardware) 를 가 상화하여 System VxD 를 제공한다.  VMM.VxD, VPICD.VxD, VCOMM.VxD  Hardware Design Vendor 는 자신들의 Device 를 위하여 Virtual Device Driver 를 제공해야 한다.  Microsoft 는 순수한 32bit Device Driver Design 을 권고하고 있으며 Hardware 에 관련된 모든 작업을 Device Driver 에서 전담하고 App 는 단지 Data 를 조작하는 수준으로 만들도록 권고.

VxD Programming 환경  Windows95 DDK (Microsoft MSDN)  32bit Assembler (MSAM 6.11c)  32bit C Complier & Linker (Visual C 이상 ) VToolsD  Vireo 사의 DDK Tool  C & C++ 로 VxD 작성가능  완벽한 C Wrapper Function 제공  풍부한 C++ Class Library 제공  Quick VxD Wizzard 를 이용한 VxD 기본 골격을 자동 생성

Two Scenario for VxD Programming First Scenario  Hardware Resource 를 VxD & Application 에서 제어  I/O Trapping & Interrupt Virtualization 요구  Application 간 Thread Switching 으로 인한 High Latency 문제  Ring-zero 와 Ring-Three 간 Switching 으로 인한 High Latency 문제 Second Scenario  Hardware Resource 를 VxD 에서 전담하여 처리  Application 은 처리할 Data 만을 VxD 로 넘겨주고 처리된 Data 를 받 아서 Windows Processing 수행  I/O Trapping 불필요  Interrupt 의 경우 Hw_Int_Proc 만을 고려하여 작성  Microsoft 에서 권장하고 있는 방법 (32bit VxD)

VxD Basic Conception Device Declaration Block(DDB)  Device Driver 의 구조에 대한 선언  VMM 과 Device Driver 의 Communication 에서 사용됨  DDB 에 선언되는 내용 - Device Driver Name - Major Version - Minor Version - Control Procedure - Device ID - Initial Order - V86 API Procedure(16bit Application 에서 사용 ) - PM API Procedure(16bit Application 에서 사용 )

VxD Basic Conception Control Procedure  VMM 은 모든 Loaded VxDs 로 System Control 메세지를 보낸다.  VxD 는 이들 Messages 를 받기 위하여 Device Control Procedure 를 Export 한다.(Begin_Control_Dispatch macro 에서 정의 )  Procedure 는 Message Code 를 분석하고 SubProcedure 를 실행 - Startup and Shutdown Message - Virtual Machine Message - Other Control Message(Dynamic VxD Message 외 다수 ) - Sys_Dynamic_Device_Init - Sys_Dynamic_Device_Exit - W32_DeviceIoControl

VxD Basic Conception Dynamic Device Driver(Dynamic VxD)  Sys_Dynamic_Device_Init - Device 가 Load 되는 시점에 Device Driver 초기화하는 Routine - I/O Port Virtualization - Interrupt Virtualization  Sys_Dynamic_Device_Exit - Device 가 Unload 되는 시점에 Device Driver 가 획득한 모 든 Handle 및 Memory 를 System 에 반환하는 Routine - I/O Port Trapping 을 Remove - Interrupt Virtualization Handle 을 System 에 반환

VxD Basic Conception VxD & 16bit Application Interface  Software Interrupt 사용  DDB 에서 선언된 V86 & PM API Procedure 이용  INT 2Fh.. Function 1684h 를 이용하여 API 의 Address 를 얻는다.  VM Control Block, Client_Register, Thread Control Block Data Stucture 를 이용

VxD Basic Conception VxD & 32bit Application Interface  CreateFile Function 을 이용하여 VxD 를 Load 시키고 VxD 에 대한 Handle 을 얻는다.  Win32 Application 과 Communication 할 수 있는 유일한 Interface 는 W32_DeviceIoControl Message 를 이용  Device Driver Load 시 VMM 으로부터 첫번째 W32_DeviceIoControl Message 가 보내지고  Device Driver 에서 이 Message 를 받아 Interface 가 생성  Application 은 DeviceIoControl Function 을 이용하여 W32_DeviceIoControl Message 를 생성  Device Driver 는 W32_DeviceIoControl Procedure 를 정의하고 Application 이 요구하는 일을 수행  SHELL_PostMessage Function 사용

VxD Basic Conception Win32 App APIVMMVxD Create File Device Driver Handle DeviceIoControl Return Valve Sys_Dynamic_Device_Init NO_ERROR Return W32_DEVICE_IO_CONTROL

결 론 Windos Device Driver 개발의 필요성  PC 용 Hardware 개발자에게 있어서  Windows95 OS 는 많은 베일에 가려져 있다.  더욱이 Win32 Application Software 개발시  현재 가장 많이 사용되는 Visual C++ & MFC 에서는  개발한 Hardware 를 제어할 수 있는 Function 이 거의 없다. Device Driver 개발시 어려움  Document 가 거의 없다.  Hardware & Software Bug 의 출처를 파악하기 힘들다.  Bug 발생시 System Down 의 원인  Source 가 풍부하지 않다 (Win32 Application & VxD)

참 고 자 료참 고 자 료 Systems Programming for Windows95 (Walter Oney Microsoft Press) Writing Windows VxDs and Device Drivers (Karen Hazzah R&D Books Lawrence, KS 66046)