计算机系 信息处理实验室 Leture1 concepts and tools 2005 Spring 陈香兰.

Slides:



Advertisements
Similar presentations
计算机系 信息处理实验室 Lecture 9 Memory Management(1)
Advertisements

计算机系 信息处理实验室 Lecture 3 System Mechanisms (1)
计算机系 信息处理实验室 Lecture 10 Memory Management(2)
计算机系 信息处理实验室 Understanding the Inside of Microsoft Windows Spring 陈香兰.
计算机系 信息处理实验室 Lecture 5 Startup and Shutdown
Windows 2000 System Architecture (continued) Computing Department, Lancaster University, UK.
Chorus and other Microkernels Presented by: Jonathan Tanner and Brian Doyle Articles By: Jon Udell Peter D. Varhol Dick Pountain.
计算机系 信息处理实验室 Lecture 15 File Systems
计算机系 信息处理实验室 Lecture 8 Processes, Threads, and Jobs (2)
计算机系 信息处理实验室 Lecture 16 Networking
计算机系 信息处理实验室 Lecture 11 Security
OS Fall ’ 02 Introduction Operating Systems Fall 2002.
1 Case Study 2: Windows 2000 Chapter History of windows Programming windows System structure 11.4 Processes and threads in.
Threads 1 CS502 Spring 2006 Threads CS-502 Spring 2006.
OS Spring’03 Introduction Operating Systems Spring 2003.
Operating Systems Lecture # 3. Recap Hardware Operating System Application System Call Trap Hardware Trap Processor.
1 CE6130 現代作業系統核心 Modern Operating System Kernels 許 富 皓.
Chapter 6 - Implementing Processes, Threads and Resources Kris Hansen Shelby Davis Jeffery Brass 3/7/05 & 3/9/05 Kris Hansen Shelby Davis Jeffery Brass.
计算机系 信息处理实验室 Lecture 14 Cache Manager
计算机系 信息处理实验室 Lecture 2 System architecture
计算机系 信息处理实验室 Lecture 12 I/O System
Windows 2000 Memory Management Computing Department, Lancaster University, UK.
Ceng Operating Systems 11-1 Chapter 11 : Case Study - Win 2000 History of windows 2000 Programming windows 2000 System structure Processes and threads.
Chapter 8 Windows Outline Programming Windows 2000 System structure Processes and threads in Windows 2000 Memory management The Windows 2000 file.
MODERN OPERATING SYSTEMS Third Edition ANDREW S. TANENBAUM Chapter 11 Case Study 2: Windows Vista Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall,
计算机系 信息处理实验室 Lecture 7 Processes, Threads, and Jobs (1)
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition, Chapter 2: System Structures.
Process Management. Processes Process Concept Process Scheduling Operations on Processes Interprocess Communication Examples of IPC Systems Communication.
1 Microsoft Windows Internals. 2 Chapter 1 Concepts and Tools.
Windows Object Manager CS Spring Overview The object paradigm NT Objects and the Object Manager Object Structure Object Naming Object Handles.
计算机系 信息处理实验室 Lecture 6 Management Mechanisms
10/16/ Realizing Concurrency using the thread model B. Ramamurthy.
Windows 2000 Course Summary Computing Department, Lancaster University, UK.
计算机系 信息处理实验室 Lecture 4 System Mechanisms (2)
Windows 2000 System Mechanisms Computing Department, Lancaster University, UK.
Hardware process When the computer is powered up, it begins to execute fetch-execute cycle for the program that is stored in memory at the boot strap entry.
Chapter 2 Processes and Threads Introduction 2.2 Processes A Process is the execution of a Program More specifically… – A process is a program.
System Components ● There are three main protected modules of the System  The Hardware Abstraction Layer ● A virtual machine to configure all devices.
Hardware process When the computer is powered up, it begins to execute fetch-execute cycle for the program that is stored in memory at the boot strap entry.
University of Amsterdam Computer Systems – the instruction set architecture Arnoud Visser 1 Computer Systems The instruction set architecture.
Windows Threading Colin Roby Jaewook Kim.
Lecture 5 Rootkits Hoglund/Butler (Chapters 1-3).
Overview of Windows Driver Development Reference: us/gstart/hh/gstart/gs_intro_031j.asp.
Introduction to Operating Systems Concepts
Chapter 3: Windows7 Part 5.
CS 3214 Computer Systems Lecture 9 Godmar Back.
Hardware and OS Design and Layout.
Processes and threads.
Windows API.
Windows 95 & 98 Steve Boyle Mike Forster Maggie Hamill Nancy O’Brien.
Unit OS2: Operating System Principles
FLIPPED CLASSROOM ACTIVITY CONSTRUCTOR
CS490 Windows Internals Quiz 2 09/27/2013.
Threads and Locks.
Chapter 3: Windows7 Part 2.
Chapter 3: Windows7 Part 5.
Windows Internals Brown-Bag Seminar Chapter 1 – Concepts and Tools
Realizing Concurrency using Posix Threads (pthreads)
Chapter 15, Exploring the Digital Domain
Case Study 2: Windows History of windows 2000
Realizing Concurrency using the thread model
Chapter 3: Windows7 Part 2.
Modern Operating System Kernels
Lecture Topics: 11/1 General Operating System Concepts Processes
Realizing Concurrency using Posix Threads (pthreads)
Realizing Concurrency using the thread model
Operating Systems: A Modern Perspective, Chapter 3
Realizing Concurrency using Posix Threads (pthreads)
Outline Operating System Organization Operating System Examples
System Calls System calls are the user API to the OS
Presentation transcript:

计算机系 信息处理实验室 Leture1 concepts and tools 2005 Spring 陈香兰

计算机系 信息处理实验室 the Inside of Windows Foundation Concepts and Terms Win32 API Services, Functions, and Routines Processes, Threads, and Jobs Virtual memory Kernel Mode vs. User Mode Objects & handles …

计算机系 信息处理实验室 the Inside of Windows Win32 API REF2 and REF3 We will explain the internal behavior and implementation of key Win32 API functions functions that cover areas such as processes, threads, memory management, security, I/O, windowing, and graphics History: Win3.x

计算机系 信息处理实验室 the Inside of Windows Services, Functions, and Routines [1,2,3 ] Win32 API functions CreatProcess, CreatFile, GetMessage, … System services (or executive system services) Native functions in the 2KOS that are callable from user mode Similar to: system call (int 0x80, int 0x2e) NtCreateProcess, NtWriteFile

计算机系 信息处理实验室 the Inside of Windows Example: NtWriteFile: mov eax, 0x0E ; build 2195 system service ; number for NtWriteFile mov ebx, esp ; point to parameters int 0x2E ; execute system service trap ret 0x2C; pop parameter of stack and ; return to caller

计算机系 信息处理实验室 the Inside of Windows Services, Functions, and Routines [ 1, 2,3 ] Kernel support functions (or routines) Subroutines inside the kernel-mode ExAllocatePool (for device driver to allocate memory from the 2K system heaps ) Win32 services Processes started by the Windows 2000 service control manager

计算机系 信息处理实验室 the Inside of Windows Services, Functions, and Routines [ 1,2, 3] DLL (dynamic-link library) A set of callable subroutines linked together as a binary file that can be dynamically loaded by applications that use the subroutines Example: Msvcrt.dll (C 运行时库 ), Kernel32.dll (Win32 API 子系统库之一 ) Advantages: sharable

计算机系 信息处理实验室 the Inside of Windows2000 8

计算机系 信息处理实验室 the Inside of Windows Processes, Threads, and Jobs [1, 2,3,4 ] Program VS. Process A process include ???

计算机系 信息处理实验室 the Inside of Windows Processes, Threads, and Jobs [ 1, 2,3,4 ] A 2K Process A private Virtual address space An executable program A list of open handles to various system resources, such as semaphores, communication ports, and files, that are accessible to all threads in the process A security context Process id At least one thread of execution

计算机系 信息处理实验室 the Inside of Windows Processes, Threads, and Jobs [ 1,2, 3,4 ] A process and its resources

计算机系 信息处理实验室 the Inside of Windows Processes, Threads, and Jobs [ 1,2,3, 4] Thread: the entity within a process that Windows 2000 schedules for execution Hardware Context Two stacks Thread-local-storage Thread id … Threads of the same process share its resources Shared memory section Context of a thread

计算机系 信息处理实验室 the Inside of Windows Virtual memory [1,2,3,4 ] Linear 32bit address space = 4GB

计算机系 信息处理实验室 the Inside of Windows Virtual memory [ 1, 2,3,4 ]

计算机系 信息处理实验室 the Inside of Windows Virtual memory [ 1,2, 3,4 ] Mapping to physical memory

计算机系 信息处理实验室 the Inside of Windows Virtual memory [ 1,2,3, 4] What if physical memory > virtual memory AWE for 32bit virtual address space <=64GB The long-term solution: 64bit

计算机系 信息处理实验室 the Inside of Windows Kernel Mode vs. User Mode 2K uses two processor access modes Kernel mode and user mode I386 supports 4 modes 0  Kernel mode 3  User mode User mode  Kernel mode Demo

计算机系 信息处理实验室 the Inside of Windows Objects & handles An object is a single, run-time instance of a statically defined object type An object type comprises a system-defined data type, functions that operate on instances of the data type, and a set of object attributes. Object attribute, Object methods Example: process, thread, file, event Handles: references to an instance of an object

计算机系 信息处理实验室 the Inside of Windows Others Security supports C2-level security as defined by the U.S. Department of Defense Trusted Computer System Evaluation Criteria (DoD STD, December 1985) Registry A system database the information required to boot and configure the system, systemwide software settings, the security database, and per-user configuration settings

计算机系 信息处理实验室 the Inside of Windows Unicode (16bit) Two versions of Win32 function: unicode(16bit) and ANSI(8bit)

计算机系 信息处理实验室 the Inside of Windows Tools for Viewing Windows 2K Internals Page 11-16

计算机系 信息处理实验室 the Inside of Windows Thank you!