Windows 2000 Michael Blinn Ben Hejl Jane McHugh Matthew VanMater.

Slides:



Advertisements
Similar presentations
Processes and Threads Chapter 3 and 4 Operating Systems: Internals and Design Principles, 6/E William Stallings Patricia Roy Manatee Community College,
Advertisements

Threads, SMP, and Microkernels
Chapter 3 Process Description and Control
OS/2 Warp Chris Ashworth Cameron Davis John Weatherley.
李盈賢.  Start a process with a specific priority class  Methods: 1)Cmd: start /’priority’ ‘filename’ 2)Create a shortcut.
Threads, SMP, and Microkernels Chapter 4. Process Resource ownership - process is allocated a virtual address space to hold the process image Scheduling/execution-
Chapter 4 Threads, SMP, and Microkernels Patricia Roy Manatee Community College, Venice, FL ©2008, Prentice Hall Operating Systems: Internals and Design.
计算机系 信息处理实验室 Lecture 8 Processes, Threads, and Jobs (2)
Computer Systems/Operating Systems - Class 8
Review: Chapters 1 – Chapter 1: OS is a layer between user and hardware to make life easier for user and use hardware efficiently Control program.
Chapter 5 Processes and Threads Copyright © 2008.
INTRODUCTION OS/2 was initially designed to extend the capabilities of DOS by IBM and Microsoft Corporations. To create a single industry-standard operating.
Introduction to Operating Systems – Windows process and thread management In this lecture we will cover Threads and processes in Windows Thread priority.
Home: Phones OFF Please Unix Kernel Parminder Singh Kang Home:
CSCE 351: Operating System Kernels
3.5 Interprocess Communication
Chapter 11 Operating Systems
1 Operating Systems Ch An Overview. Architecture of Computer Hardware and Systems Software Irv Englander, John Wiley, Bare Bones Computer.
Threads, SMP, and Microkernels
1 Process Description and Control Chapter 3 = Why process? = What is a process? = How to represent processes? = How to control processes?
Threads CS 416: Operating Systems Design, Spring 2001 Department of Computer Science Rutgers University
Using Two Queues. Using Multiple Queues Suspended Processes Processor is faster than I/O so all processes could be waiting for I/O Processor is faster.
1 Threads Chapter 4 Reading: 4.1,4.4, Process Characteristics l Unit of resource ownership - process is allocated: n a virtual address space to.
Chapter 51 Threads Chapter 5. 2 Process Characteristics  Concept of Process has two facets.  A Process is: A Unit of resource ownership:  a virtual.
Budapesti Műszaki és Gazdaságtudományi Egyetem Méréstechnika és Információs Rendszerek Tanszék Scheduling in Windows Zoltan Micskei
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,
Chapter 3 Process Description and Control Operating Systems: Internals and Design Principles, 6/E William Stallings Patricia Roy Manatee Community College,
1 Operating System Overview Chapter 2 Advanced Operating System.
1 Lecture 4: Threads Operating System Fall Contents Overview: Processes & Threads Benefits of Threads Thread State and Operations User Thread.
Chapter 4 Threads, SMP, and Microkernels Patricia Roy Manatee Community College, Venice, FL ©2008, Prentice Hall Operating Systems: Internals and Design.
1 Threads, SMP, and Microkernels Chapter 4. 2 Focus and Subtopics Focus: More advanced concepts related to process management : Resource ownership vs.
Windows 2000 Course Summary Computing Department, Lancaster University, UK.
Processes and Threads Processes have two characteristics: – Resource ownership - process includes a virtual address space to hold the process image – Scheduling/execution.
Microsoft Windows 2000 Daniel Hummell Ryan McKenica Valerie Grinblat.
MODERN OPERATING SYSTEMS Third Edition ANDREW S. TANENBAUM Chapter 2 Processes and Threads Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall,
 2004 Deitel & Associates, Inc. All rights reserved. 1 Chapter 4 – Thread Concepts Outline 4.1 Introduction 4.2Definition of Thread 4.3Motivation for.
CE Operating Systems Lecture 11 Windows – Object manager and process management.
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.
Threads, SMP, and Microkernels Chapter 4. Process Resource ownership - process is allocated a virtual address space to hold the process image Scheduling/execution-
Computers Operating System Essentials. Operating Systems PROGRAM HARDWARE OPERATING SYSTEM.
Threads G.Anuradha (Reference : William Stallings)
Scott Ferguson Section 1
Processes and Process Control 1. Processes and Process Control 2. Definitions of a Process 3. Systems state vs. Process State 4. A 2 State Process Model.
1 Threads, SMP, and Microkernels Chapter Multithreading Operating system supports multiple threads of execution within a single process MS-DOS.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition, Chapter 3: Process-Concept.
System Components ● There are three main protected modules of the System  The Hardware Abstraction Layer ● A virtual machine to configure all devices.
© Janice Regan, CMPT 300, May CMPT 300 Introduction to Operating Systems Operating Systems Processes and Threads.
Amanda Johnson Hannah Young Josh Taylor Rich Carroll Troy Gladhill Saunders Roesser.
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 3 Operating Systems. © 2005 Pearson Addison-Wesley. All rights reserved 3-2 Chapter 3 Operating Systems 3.1 The Evolution of Operating Systems.
Chapter 2 Process Management. 2 Objectives After finish this chapter, you will understand: the concept of a process. the process life cycle. process states.
Cs431-cotter1 Processes and Threads Tanenbaum 2.1, 2.2 Crowley Chapters 3, 5 Stallings Chapter 3, 4 Silberschaz & Galvin 3, 4.
What is a Process ? A program in execution.
Chapter 4 Threads, SMP, and Microkernels Dave Bremer Otago Polytechnic, N.Z. ©2008, Prentice Hall Operating Systems: Internals and Design Principles, 6/E.
1 Threads, SMP, and Microkernels Chapter 4. 2 Process Resource ownership - process includes a virtual address space to hold the process image Scheduling/execution-
Threads, SMP, and Microkernels Chapter 4. Processes and Threads Operating systems use processes for two purposes - Resource allocation and resource ownership.
Advanced Operating Systems CS6025 Spring 2016 Processes and Threads (Chapter 2)
Processes and Threads Chapter 3 and 4 Operating Systems: Internals and Design Principles, 6/E William Stallings Patricia Roy Manatee Community College,
CS 6560: Operating Systems Design
Operating System (OS) QUESTIONS AND ANSWERS
Threads and Locks.
Chapter 3: Windows7 Part 2.
Threads, SMP, and Microkernels
Chapter 3: Windows7 Part 2.
Lecture Topics: 11/1 General Operating System Concepts Processes
Lecture 4- Threads, SMP, and Microkernels
February 5, 2004 Adrienne Noble
Outline Operating System Organization Operating System Examples
Michael Blinn Ben Hejl Jane McHugh Matthew VanMater
Presentation transcript:

Windows 2000 Michael Blinn Ben Hejl Jane McHugh Matthew VanMater

Overview Environment –Designed to provide a true 32-bit, preemptive, reentrant, virtual memory OS –Run on multiple hardware architectures and platforms –Run and scale well on SMP systems –Network client and server –Run most existing 16-bit MD-DOS and Microsoft Windows 3.1 applications –Supports Unicode –Portable through the use of Hardware Abstraction Layer (HAL)

Overview Continued Uses some state-of-the-art concepts. –Object Oriented design – Hybrid Microkernel As of February 2001, over one million licenses for the Server have been sold.

Overview Continued Strengths –Hybrid Microkernel –APIs Allow compatibility Weaknesses –Weak remote administration facilities

Scheduling Priorities –Levels 32 priority levels, ranging from 0 to 31. Each process has one priority level, threads have two –Queues and Data Structures Series of queues- one for each scheduling priority Queues contain threads that are in the ready state Ready summary bitmask Idle summary bitmask

Scheduling Continued –Queues and Data Structures Continued Wait queues handled differently –Current priority threads can be boosted Upon completion of an I/O operation After waiting on executive events or semaphores After threads in the foreground process complete a wait operation When GUI threads wake up When a thread that is ready to run has been waiting for some time

Scheduling Continued –I/O requests to devices that warrant better responsiveness have higher boost values. –After the boost is applied, the thread is ran for one quantum at the elevated priority level, after which it decays one priority level, and so on. CPU Starvation –Win2K maintains a system thread called the balance set manager.

Scheduling Continued Real Time –15 priority levels in Windows 2000 –Levels normally reserved for kernel-mode system threads. –Win2K does not provide real-time operating system facilities.

Scheduling Continued Priority Scheduling Differences in a Multi-Processor Environment –Steps after a thread is selected for execution 1.Schedule the thread on an idle processor in order of ideal, last, and current CPU. 2.Schedule the thread on any idle processor. 3.Preempt a thread currently running on a processor in order of ideal, last, and current CPU.

Scheduling Continued Thread States –Ready- thread waiting to execute –Standby- thread selected to run next –Running- executing thread –Waiting- thread waiting on an event to occur –Transition- thread ready but paged out of memory –Terminated- thread that finishes execution –Initialized- used when a thread is being created

Scheduling Continued Thread Transitions –Voluntary Switch –Preemption –Quantum end –Termination

Scheduling Continued The Zero Page Thread –Enables and disables interrupts –Checks for any DPCs pending on any processor and delivers them if necessary –Checks whether a thread has been selected to run next on the CPU and, if so, dispatches it –Performs checks for power management functions

Scheduling Continued In Win2K, a thread’s context and the procedure for context switching vary depending on the processor’s architecture. Saving and reloading of this data is made possible by using a kernel-mode stack.

Scheduling Continued Typically, a context switch involves saving and reloading the following data: –Program counter –Processor status register –Other register contents –User and kernel stack pointers –Pointer to the thread’s address space in which it runs

Memory Management Memory manager provides a variety of services to the OS including: –Virtual memory management –Shared memory and mapped files –Locking memory –Protecting memory

Memory Management Continued Virtual Memory Management –Each user process has a separate 32-bit address space, allowing 4 gigabytes of memory per process. –Yet, 2 gigabytes of this address space is reserved for the OS so the available virtual address space is actually 2 gigabytes.

Memory Management Continued Virtual Memory Management Continued –Pages in a process address are free, reserved, or committed. Free- not currently being used Reserved- thread reserves a range of virtual addresses that may be needed in the future Committed- eventually become valid pages in physical memory, once accessed

Memory Management Continued Shared Memory and Mapped Files –Each process maintains its private memory area, yet the program instructions and unmodified data can be shared without harm. –Implementing shared memory involves the use of shared objects. Shared objects- represent a block of memory that 2 or more processes can share and can be mapped to the paging file or to another file on disk

Memory Management Continued Locking Memory –Two ways that pages can be locked in memory: Once pages are locked, they remain in memory until unlocked Can be locked through the function, VirtualLock –VirtualLock can be called by an application to lock pages in their process working set.

Memory Management Continued Protecting Memory –Prevents user processes from accessing the address space of another process or the OS itself. 1.Any structures, etc. used by kernel-mode system components are accessible only in kernel mode (not user mode). 2.Each process has a private address space

Memory Management Continued 3.All processes are supported by some form of hardware-controlled memory protection. 4.Shared memory section objects have standard access-control lists (ACLs) that are checked when processes attempt to open them. This limits shared memory access to only processes with proper rights.

Memory Management Continued Page Directories –Each process has a single page directory that the memory manager creates to map the location of all page tables for that process. –The physical address of the process page directory is stored in the kernel process block and is also mapped virtually. –Executable code running in kernel mode uses references to virtual, not physical, addresses.

Memory Management Continued Page Directories Continued –The OS constructs a page table, containing the mapping information needed to find the desired page. –In Windows 2000, each process has its own set of process page tables to map that private address space. This is because Win2K provides a private address space for each process.

File Management Main objectives a file management system: –Meets the data management needs and requirements of the user. –Guarantees valid data in the files. –Optimizes performance from the viewpoint of the system and the user. –Provides I/O support for many storage device types. –Helps to eliminates losing or destroying data. –Provides a uniform set of I/O interface routines. –Provides necessary I/O support in times of multiple- user systems.

File Management Continued The only way that a user or application is able to access a file is through the file management system. Win2K includes support for these file system formats: –CDFS, UDF, FAT12, FAT16, FAT32, NTFS

File Management Continued NTFS –Meets high-end requirements for workstations and servers. Client/server applications, resource intensive engineering, network applications –Uses 64-bit cluster indexes, yet Win2K limits the size of an NTFS volume to 32-bit clusters.

File Management Continued –Notable features of NTFS: Recoverability, file and directory security, disk quotas, file compression, directory-based symbolic links, and encryption Many of these support the main objectives for a file management system. –Organizes information into 4 regions on a disk volume: Partition boot sector, Master file table, System files, File area

Threads Supports user-level and kernel-level threads –Kernel-level threads User mode kernel-level threads –Created and runs in user mode –Can be preempted by the scheduler System worker threads –Created by threads and only exist to do work for other threads –Specific types are: delayed worker threads, critical worker threads, and hypercritical worker threads

Threads –Kernel-level threads continued Kernel mode system threads –Have all the attributes of a user mode thread, but can only be run in kernel mode. –Objects running in kernel mode can only create this type of thread. –Has no process address space and must allocate all its storage needs dynamically from the heap- this is different than a user mode system thread.

Threads –User-level threads Created as a normal thread, and then converted to a fiber. The scheduler does not preemptively schedule different fibers (threads). Instead, a fiber must be switched to from another fiber. The system can preempt the thread controlling the fiber suspending the execution of the fiber.

Mutual Exclusion and Synchronization Works differently inside and outside of the kernel of Windows Within the kernel, much of the mutual exclusion is done using spinlocks. Outside the kernel, the objects providing mutual exclusion and synchronization rely on services provided by the kernel.

Kernel Synchronization Synchronization in the kernel of Windows 2000 guarantees that only one processor can be executing in a critical section. –Enforced by disabling certain interrupts. –Spinlocks used to protect the core data structures of the kernel.

Kernel Synchronization Continued Mutual exclusion and synchronization within the kernel –Dealt with by modifying how interrupts are handled. –Uses spinlocks Spinlock- Provides a global data structure in the kernel. Before entering a critical section, the kernel must acquire the spinlock associated with the critical section

Kernel Synchronization Continued Mutual exclusion and synchronization outside the kernel –Executive objects use dispatcher objects (ex- mutexes, semaphores, events, waitable timers) –A thread will issue a wait on one of these objects if it wants to use it. –While waiting, the thread is placed into a suspended state until the dispatcher object enters a signaled state.

Summary Preemptive, multitasking, multiprocessing, multiuser Scheduling / data management slightly different Object-driven architecture Hybrid kernel Multiple-architecture realized through HAL