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.
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)
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.
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:
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
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.
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 4 Threads, SMP, and Microkernels Patricia Roy Manatee Community College, Venice, FL ©2008, Prentice Hall Operating Systems: Internals and Design.
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.
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.
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.
Windows 2000 Michael Blinn Ben Hejl Jane McHugh Matthew VanMater.
System Components ● There are three main protected modules of the System  The Hardware Abstraction Layer ● A virtual machine to configure all devices.
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 2 Process Management. 2 Objectives After finish this chapter, you will understand: the concept of a process. the process life cycle. process states.
What is an Operating System? Various systems and their pros and cons –E.g. multi-tasking vs. Batch OS definitions –Resource allocator –Control program.
What is a Process ? A program in execution.
Threads, SMP, and Microkernels Chapter 4. Processes and Threads Operating systems use processes for two purposes - Resource allocation and resource ownership.
Multiprogramming. Readings r Chapter 2.1 of the textbook.
Introduction to Operating Systems Concepts
Chapter 4 – Thread Concepts
Chapter 3: Windows7 Part 5.
Processes and threads.
Process Management Process Concept Why only the global variables?
CS 6560: Operating Systems Design
Topics Covered What is Real Time Operating System (RTOS)
Operating System (OS) QUESTIONS AND ANSWERS
OPERATING SYSTEMS CS3502 Fall 2017
Chapter 4 – Thread Concepts
Threads and Locks.
Chapter 3: Windows7 Part 2.
MODERN OPERATING SYSTEMS Third Edition ANDREW S
Chapter 3: Windows7 Part 5.
Threads, SMP, and Microkernels
Chapter 3: Windows7 Part 2.
Chapter 2: The Linux System Part 3
Process Description and Control
Lecture Topics: 11/1 General Operating System Concepts Processes
Process Description and Control
Lecture 4- Threads, SMP, and Microkernels
Operating Systems : Overview
Threads Chapter 4.
Operating Systems : Overview
Operating Systems : Overview
Operating Systems : Overview
February 5, 2004 Adrienne Noble
Operating Systems : Overview
Operating Systems : Overview
Chapter 2 Processes and Threads 2.1 Processes 2.2 Threads
Outline Operating System Organization Operating System Examples
CS703 – Advanced Operating Systems
Threads CSE 2431: Introduction to Operating Systems
Presentation transcript:

Michael Blinn Ben Hejl Jane McHugh Matthew VanMater 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 Weaknesses Hybrid Microkernel APIs Allow compatibility Weaknesses Weak remote administration facilities

Scheduling Priorities Levels Queues and Data Structures 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 CPU Starvation 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 Schedule the thread on an idle processor in order of ideal, last, and current CPU. Schedule the thread on any idle processor. 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. Any structures, etc. used by kernel-mode system components are accessible only in kernel mode (not user mode). Each process has a private address space

Memory Management Continued All processes are supported by some form of hardware-controlled memory protection. 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 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 2000. 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