Chapter 8 Windows 2000. 2 Outline Programming Windows 2000 System structure Processes and threads in Windows 2000 Memory management The Windows 2000 file.

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

Chorus and other Microkernels Presented by: Jonathan Tanner and Brian Doyle Articles By: Jon Udell Peter D. Varhol Dick Pountain.
Chap 2 System Structures.
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-
Chapter 4 Threads, SMP, and Microkernels Patricia Roy Manatee Community College, Venice, FL ©2008, Prentice Hall Operating Systems: Internals and Design.
Slide 6-1 Copyright © 2004 Pearson Education, Inc. Operating Systems: A Modern Perspective, Chapter 6 Implementing Processes, Threads, and Resources.
Figure 2.8 Compiler phases Compiling. Figure 2.9 Object module Linking.
Case Study: Windows 2000 Part I Will Richards CPSC 550 Spring 2001.
1 Case Study 2: Windows 2000 Chapter History of windows Programming windows System structure 11.4 Processes and threads in.
Introduction to Operating Systems – Windows process and thread management In this lecture we will cover Threads and processes in Windows Thread priority.
2: OS Structures 1 Jerry Breecher OPERATING SYSTEMS STRUCTURES.
Home: Phones OFF Please Unix Kernel Parminder Singh Kang Home:
Process Management. External View of the OS Hardware fork() CreateProcess() CreateThread() close() CloseHandle() sleep() semctl() signal() SetWaitableTimer()
OPERATING SYSTEMS Introduction
Chapter 6 Implementing Processes, Threads, and Resources.
1 Process Description and Control Chapter 3 = Why process? = What is a process? = How to represent processes? = How to control processes?
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.
Dreams in a Nutshell Steven Sommer Microsoft Research Institute Department of Computing Macquarie University.
Chapter 51 Threads Chapter 5. 2 Process Characteristics  Concept of Process has two facets.  A Process is: A Unit of resource ownership:  a virtual.
Slide 6-1 Copyright © 2004 Pearson Education, Inc. Operating Systems: A Modern Perspective, Chapter 6.
Chapter 3 Operating Systems Introduction to CS 1 st Semester, 2015 Sanghyun Park.
Ceng Operating Systems 11-1 Chapter 11 : Case Study - Win 2000 History of windows 2000 Programming windows 2000 System structure Processes and threads.
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,
Protection and the Kernel: Mode, Space, and Context.
Processes and Threads.
OS provide a user-friendly environment and manage resources of the computer system. Operating systems manage: –Processes –Memory –Storage –I/O subsystem.
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-
Operating Systems Lecture November 2015© Copyright Virtual University of Pakistan 2 Agenda for Today Review of previous lecture Hardware (I/O, memory,
Processes Introduction to Operating Systems: Module 3.
1 Threads, SMP, and Microkernels Chapter Multithreading Operating system supports multiple threads of execution within a single process MS-DOS.
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.
Processes, Threads, and Process States. Programs and Processes  Program: an executable file (before/after compilation)  Process: an instance of a program.
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.
2 Processor(s)Main MemoryDevices Process, Thread & Resource Manager Memory Manager Device Manager File Manager.
What is an Operating System? Various systems and their pros and cons –E.g. multi-tasking vs. Batch OS definitions –Resource allocator –Control program.
Threads, SMP, and Microkernels Chapter 4. Processes and Threads Operating systems use processes for two purposes - Resource allocation and resource ownership.
1 Chapter 2: Operating-System Structures Services Interface provided to users & programmers –System calls (programmer access) –User level access to system.
Processes and Threads Chapter 3 and 4 Operating Systems: Internals and Design Principles, 6/E William Stallings Patricia Roy Manatee Community College,
Multiprogramming. Readings r Chapter 2.1 of the textbook.
Chapter 3: Windows7 Part 5.
Module 12: I/O Systems I/O hardware Application I/O Interface
Chapter 4 Threads.
Unit OS4: Scheduling and Dispatch
Operating Systems: A Modern Perspective, Chapter 6
Unit OS2: Operating System Principles
Threads and Locks.
Threads & multithreading
Chapter 3: Windows7 Part 2.
Chapter 3: Windows7 Part 5.
Windows Internals Brown-Bag Seminar Chapter 1 – Concepts and Tools
Threads, SMP, and Microkernels
Case Study 2: Windows History of windows 2000
Chapter 3: Windows7 Part 2.
Lecture Topics: 11/1 General Operating System Concepts Processes
Lecture 4- Threads, SMP, and Microkernels
Threads Chapter 4.
Chapter 2 Processes and Threads 2.1 Processes 2.2 Threads
Operating Systems Lecture 3.
Chapter 13: I/O Systems I/O Hardware Application I/O Interface
Implementing Processes, Threads, and Resources
Outline Operating System Organization Operating System Examples
Implementing Processes, Threads, and Resources
Michael Blinn Ben Hejl Jane McHugh Matthew VanMater
In Today’s Class.. General Kernel Responsibilities Kernel Organization
Presentation transcript:

Chapter 8 Windows 2000

2 Outline Programming Windows 2000 System structure Processes and threads in Windows 2000 Memory management The Windows 2000 file system

3 Microsoft Operating Systems Command-line oriented systems –MS-DOS Consumer Windows –Windows 95/98/Me Windows NT Windows 2000 = Windows NT 5.0

4 Win32 API Library procedures making system calls or do the work right in user space Provide a very comprehensive interface –Multiple ways of doing the same thing –Include many non-system call functions Not every version of Windows implements every call –Sometimes there are minor differences, e.g., parameters

5 The Registry A big central database in Windows –Keep all infomation for booting and configuring the system and tailoring it to current user A file system for very small files –Keys, subkeys: directories –Value: files Each value has three parts: a name, a type, and the data Stored in files called hives –Most are under \winnt\system32\config

6 Outline Programming Windows 2000 System structure Processes and threads in Windows 2000 Memory management The Windows 2000 file system

7 Operating System Structure OS itself running in kernel mode –Process management –Memory management –File system Environment subsystem in user mode Client-server model

8 The Structure of Windows 2000

9 HAL and Kernel HAL: present the rest of OS with abstract hardware devices Kernel: make the rest of OS completely independent of the hardware –Provide low-level support for control objects and dispatcher objects –Control objects: control the system e.g., primitive process objects, interrupt objects –Dispatcher objects: objects threads can wait on Semaphores, mutexes, events, waitable timers, …

10 Executive and System Services 10 components –Object, I/O, process, memory, security, cache, plug-and-play, power, configuration, local procedure call Each component is a collection of procedures GDI (graphics device interface) handles image management for monitor and printers System Services: provide an interface to executive

11 Implementation of Objects A uniform and consistent interface to all system sources and data structures Some number of consecutive words in mem –A data structure in RAM

12 Handle Table, Objects and Type Objects

13 Environment Subsystem DLLs + environment subsystem: implement the functionality of published interface –Win32, POSIX and OS/2 –Hide the true system call interface from app DLL (dynamic linked library) –Share common library calls, linked at runtime

14 Outline Programming Windows 2000 System structure Processes and threads in Windows 2000 Memory management The Windows 2000 file system

15 Basic Concepts Job: collection of processes that share quotas and limits Process: container for holding resources –4G address space, bottom 2G for user –OS is present in every process’ address Thread: unit of CPU scheduling –Threads (not processes) have states –Some daemon threads in kernel space –Thread switching enters kernel mode Fiber: lightweight thread managed in user space –One thread has multiple fiber

16 Interprocess Communication Mailslots: similar to pipe in UNIX –One way, no guaranteed delivery, can have multiple receivers Sockets: pipes often across machines Remote procedure calls Share memory by mapping on to same file Synchronization mechanisms –Semaphores, mutexes, critical regions, events –They work on threads, not on processes

17 Create A Process CreateProcess call in Win32 Examine and open the executable file as a parameter (user mode in kernel32.dll) Call NtCreateProcess, create empty process kernel and executive objects, initialization Call NtCreateThread, create the initial thread Pass the process/thread handles to Win32 environment Start the initial thread, complete initialization Set priority, etc, rune the code of the process

18 Scheduling in Windows 2000 No central scheduling thread Current thread executes scheduler code –The thread blocks on a semaphore, mutex, I/O (kernel mode) –The thread signals an object (kernel mode) –The running thread’s quantum expires (trap to kernel)

19 Priorities of Threads (0-31) Win32 process class priorities Win32 thread priority Real time High Above normal Normal Below normal Idle Time critical3115 Highest Above normal Normal Below normal Lowest Idle

20 Scheduling An array of 32 queues of threads –Scheduling is based on threads The thread with highest priority runs next –When multiple threads ready at the highest priority level, they run round robin for one quantum each –When quantum expires, the thread goes to the end of the queue

21 Outline Programming Windows 2000 System structure Processes and threads in Windows 2000 Memory management The Windows 2000 file system

22 Virtual Address Space

23 Pros and Cons of Virtual Space OS and user program are put into one virtual address space A thread traps into kernel mode and keeps on running in the same thread in system call –Only need to switch to the thread’s kernel stack Faster system calls Less private address space per process

24 Paging No pre-paging at all Paging is based on processes, not threads For each process, maintain the working set –Minimum/maximum size to control the set Working set manager checks working set quotas and # of free pages once a second

25 Outline Programming Windows 2000 System structure Processes and threads in Windows 2000 Memory management The Windows 2000 file system

26 NTFS File System A highly complex and sophisticated system A NTFS file is a set of streams –Name, object ID, (multiple) data streams –Word processing, two versions of a document Temporary one (named): in use during editing Final one (unnamed): the user is done –Both streams share a file name, security info, timestamp, etc. Win32 function calls are roughly similar to their UNIX counterparts