计算机系 信息处理实验室 Lecture 4 System Mechanisms (2)

Slides:



Advertisements
Similar presentations
计算机系 信息处理实验室 Lecture 3 System Mechanisms (1)
Advertisements

计算机系 信息处理实验室 Lecture 10 Memory Management(2)
计算机系 信息处理实验室 Understanding the Inside of Microsoft Windows Spring 陈香兰.
计算机系 信息处理实验室 Lecture 5 Startup and Shutdown
Chorus and other Microkernels Presented by: Jonathan Tanner and Brian Doyle Articles By: Jon Udell Peter D. Varhol Dick Pountain.
计算机系 信息处理实验室 Lecture 15 File Systems
计算机系 信息处理实验室 Leture1 concepts and tools 2005 Spring 陈香兰.
Case study 1 Windows 7.
Threads, SMP, and Microkernels Chapter 4. Process Resource ownership - process is allocated a virtual address space to hold the process image Scheduling/execution-
计算机系 信息处理实验室 Lecture 8 Processes, Threads, and Jobs (2)
计算机系 信息处理实验室 Lecture 16 Networking
计算机系 信息处理实验室 Lecture 11 Security
Computer Systems/Operating Systems - Class 8
Figure 2.8 Compiler phases Compiling. Figure 2.9 Object module Linking.
Avishai Wool lecture Priority Scheduling Idea: Jobs are assigned priorities. Always, the job with the highest priority runs. Note: All scheduling.
User Level Interprocess Communication for Shared Memory Multiprocessor by Bershad, B.N. Anderson, A.E., Lazowska, E.D., and Levy, H.M.
Introduction to Operating Systems – Windows process and thread management In this lecture we will cover Threads and processes in Windows Thread priority.
CMPT 300: Operating Systems Review THIS REIVEW SHOULD NOT BE USED AS PREDICTORS OF THE ACTUAL QUESTIONS APPEARING ON THE FINAL EXAM.
Inter Process Communication:  It is an essential aspect of process management. By allowing processes to communicate with each other: 1.We can synchronize.
CSCE 351: Operating System Kernels
3.5 Interprocess Communication
Chapter 6 Implementing Processes, Threads, and Resources.
1 I/O Management in Representative Operating Systems.
Chapter 13: I/O Systems I/O Hardware Application I/O Interface
计算机系 信息处理实验室 Lecture 14 Cache Manager
计算机系 信息处理实验室 Lecture 2 System architecture
计算机系 信息处理实验室 Lecture 12 I/O System
© Microsoft Corporation1 Windows Kernel Internals Lightweight Procedure Calls David B. Probert, Ph.D. Windows Kernel Development Microsoft Corporation.
Slide 6-1 Copyright © 2004 Pearson Education, Inc. Operating Systems: A Modern Perspective, Chapter 6.
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)
Presentation by Betsy Kavali
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition, Chapter 2: System Structures.
Windows Object Manager CS Spring Overview The object paradigm NT Objects and the Object Manager Object Structure Object Naming Object Handles.
Page 110/1/2015 CSE 30341: Operating Systems Principles Windows XP  32-bit preemptive multitasking operating system for Intel microprocessors  Key goals.
计算机系 信息处理实验室 Lecture 6 Management Mechanisms
Windows 2000 Course Summary Computing Department, Lancaster University, UK.
Windows 2000 System Mechanisms Computing Department, Lancaster University, UK.
CE Operating Systems Lecture 11 Windows – Object manager and process management.
Threads, SMP, and Microkernels Chapter 4. Process Resource ownership - process is allocated a virtual address space to hold the process image Scheduling/execution-
Advanced Design and System Patterns The Microkernel Pattern.
NT Kernel CS Spring Overview Interrupts and Exceptions: Trap Handler Interrupt Request Levels and IRT DPC’s, and APC’s System Service Dispatching.
Lecture 8 Page 1 CS 111 Online Other Important Synchronization Primitives Semaphores Mutexes Monitors.
Middleware Services. Functions of Middleware Encapsulation Protection Concurrent processing Communication Scheduling.
Windows 2000 Michael Blinn Ben Hejl Jane McHugh Matthew VanMater.
Interprocess Communications Continued Andy Wang COP 5611 Advanced Operating Systems.
System Components ● There are three main protected modules of the System  The Hardware Abstraction Layer ● A virtual machine to configure all devices.
M. Accetta, R. Baron, W. Bolosky, D. Golub, R. Rashid, A. Tevanian, and M. Young MACH: A New Kernel Foundation for UNIX Development Presenter: Wei-Lwun.
Chapter 7 - Interprocess Communication Patterns
Windows Operating System Internals - by David A. Solomon and Mark E. Russinovich with Andreas Polze Unit OS3: Concurrency 3.3. Advanced Windows Synchronization.
What is an Operating System? Various systems and their pros and cons –E.g. multi-tasking vs. Batch OS definitions –Resource allocator –Control program.
Windows Operating System Internals - by David A. Solomon and Mark E. Russinovich with Andreas Polze Unit OS2: Operating System Principles 2.2. Windows.
SOCSAMS e-learning Dept. of Computer Applications, MES College Marampally INTERPROCESS COMMUNICATION AND SYNCHRONIZATION SYNCHRONIZATION.
Chapter 3: Windows7 Part 5.
The Mach System Sri Ramkrishna.
Outline Other synchronization primitives
Interprocess Communications Continued
Other Important Synchronization Primitives
Operating Systems: A Modern Perspective, Chapter 6
Threads and Locks.
Chapter 3: Windows7 Part 4.
Chapter 3: Windows7 Part 2.
Chapter 3: Windows7 Part 5.
Threads, SMP, and Microkernels
Chapter 3: Windows7 Part 2.
Lecture 4- Threads, SMP, and Microkernels
Windows NT History Design Principles System Components
CSE 451 Section 1/27/2000.
Michael Blinn Ben Hejl Jane McHugh Matthew VanMater
Presentation transcript:

计算机系 信息处理实验室 Lecture 4 System Mechanisms (2)

计算机系 信息处理实验室 the Inside of Windows Contents Trap dispatching The executive object manager Synchronization System worker threads Local procedure calls (LPCs)

计算机系 信息处理实验室 the Inside of Windows Object manager EXPERIMENT Exploring the Object Manager

计算机系 信息处理实验室 the Inside of Windows Uniform approach towards: Object protection (C2 security) Charging Object naming Object retention and garbage collection Object access (via handles) Standard object attributes Standard object methods

计算机系 信息处理实验室 the Inside of Windows Executive Objects Process Memory Section Event Timer Object directory Queues Thread File Semaphore Symbolic link Port (registry) key

计算机系 信息处理实验室 the Inside of Windows Executive objects that contain kernel objects

计算机系 信息处理实验室 the Inside of Windows Object Structure

计算机系 信息处理实验室 the Inside of Windows Object properties OM deletes object when: #open handles drops to zero #knl refs drops to zero Obj names Support identification, finding, sharing Hierarchic (per machine) name space Symbolic links, e.g. “ C: ”

计算机系 信息处理实验室 the Inside of Windows Type Objects Process objects and the process type object

计算机系 信息处理实验室 the Inside of Windows EXPERIMENT Viewing the Type Objects

计算机系 信息处理实验室 the Inside of Windows Type Object Attributes Type name Pool type Default quota Access types Generic access rights mapping Synchronization Methods

计算机系 信息处理实验室 the Inside of Windows Object Methods Open--When an object handle is opened Close--When an object handle is closed Delete--Before the object manager deletes an object Query--name When a thread requests the name of an object, such as a file, that exists in a secondary object domain Parse--When the object manager is searching for an object name that exists in a secondary object domain Security--When a process reads or changes the protection of an object, such as a file, that exists in a secondary object domain

计算机系 信息处理实验室 the Inside of Windows Object Handles & Process Handle Table

计算机系 信息处理实验室 the Inside of Windows EXPERIMENT Viewing Open Handles with Nthandle

计算机系 信息处理实验室 the Inside of Windows Structure of a handle table entry

计算机系 信息处理实验室 the Inside of Windows EXPERIMENT Viewing the Handle Table with the Kernel Debugger

计算机系 信息处理实验室 the Inside of Windows Handles and reference counts

计算机系 信息处理实验室 the Inside of Windows Synchronization Mutual exclusion one, and only one, thread can access a particular resource at a time Critical sections

计算机系 信息处理实验室 the Inside of Windows Kernel Synchronization Kernel critical sections For single-processor Simple operating systems: disable all interrupts 2K: raising the processor's IRQL For a multiprocessor spinlock

计算机系 信息处理实验室 the Inside of Windows Using a spinlock

计算机系 信息处理实验室 the Inside of Windows Executive Synchronization Dispatcher objects WaitForSingleObject WaitForMultipleObjects A thread in a Win32 application can synchronize with a Win32 process, thread, event, semaphore, mutex, waitable timer, I/O completion port, or file object Executive resources available only to kernel-mode code aren't accessible from the Win32 API

计算机系 信息处理实验室 the Inside of Windows Waiting on a dispatcher object A thread can synchronize with a dispatcher object by waiting on the object's handle

计算机系 信息处理实验室 the Inside of Windows Selected kernel dispatcher objects

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

计算机系 信息处理实验室 the Inside of Windows Wait data structures

计算机系 信息处理实验室 the Inside of Windows EXPERIMENT Looking at Wait Queues

计算机系 信息处理实验室 the Inside of Windows System worker threads Three types Delayed worker threads Critical worker threads hypercritical worker threads

计算机系 信息处理实验室 the Inside of Windows EXPERIMENT Listing System Worker Threads

计算机系 信息处理实验室 the Inside of Windows Windows 2000 Global Flags NtGlobalFlag Initialize Gflags.exe allows you to view and change the system global flags

计算机系 信息处理实验室 the Inside of Windows Local procedure calls (LPCs) An interprocess communication facility For high-speed message passing An internal mechanism available only to Windows 2000 operating system components

计算机系 信息处理实验室 the Inside of Windows EXPERIMENT Viewing LPC Port Objects

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

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

计算机系 信息处理实验室 the Inside of Windows “Internal” IPC between address spaces, e.g. Transport for local RPC Calls to Win32 subsystem Variants: n <= 256 bytes done inband n > 256 bytes via shmem section n > shmem section – addr-to-addr copy Typically client-server Client connects to servers well-known LPC port Server opens new port and tells client its address

计算机系 信息处理实验室 the Inside of Windows LPC 端口的使用