Chapter 11 Case Study Win 2000 History of

  • Slides: 45
Download presentation
Chapter 11 : Case Study - Win 2000 • History of windows 2000 •

Chapter 11 : Case Study - Win 2000 • History of windows 2000 • Programming windows 2000 • System structure • Processes and threads in windows 2000 • Memory management • Input/output in windows 2000 • The windows 2000 file system • Security in windows 2000 • Caching in windows 2000 Ceng 334 - Operating Systems 1

Windows 2000 (1) Different versions of Windows 2000 Ceng 334 - Operating Systems 2

Windows 2000 (1) Different versions of Windows 2000 Ceng 334 - Operating Systems 2

Windows 2000 (2) Comparison of some operating system sizes Ceng 334 - Operating Systems

Windows 2000 (2) Comparison of some operating system sizes Ceng 334 - Operating Systems 3

The Win 32 Application Programming Interface The Win 32 API allows programs to run

The Win 32 Application Programming Interface The Win 32 API allows programs to run on almost all versions of Windows Ceng 334 - Operating Systems 4

The Registry (1) • Top level keys and selected subkeys • Capitalization has no

The Registry (1) • Top level keys and selected subkeys • Capitalization has no meaning but follows Microsoft practice. Ceng 334 - Operating Systems 5

The Registry (2) Some of the Win 32 API calls for using the registry

The Registry (2) Some of the Win 32 API calls for using the registry Ceng 334 - Operating Systems 6

The Operating System Structure • • Structure of Windows 2000 (slightly simplified). Shaded area

The Operating System Structure • • Structure of Windows 2000 (slightly simplified). Shaded area is executed Boxes, D, are device drivers Service processes are system daemons Ceng 334 - Operating Systems 7

Hardware Abstraction Layer Some of the hardware functions the HAL manages Ceng 334 -

Hardware Abstraction Layer Some of the hardware functions the HAL manages Ceng 334 - Operating Systems 8

Implementation of Objects (1) The structure of an object Ceng 334 - Operating Systems

Implementation of Objects (1) The structure of an object Ceng 334 - Operating Systems 9

Implementation of Objects (2) Some common executive object types managed by the object manager

Implementation of Objects (2) Some common executive object types managed by the object manager Ceng 334 - Operating Systems 10

Implementation of Objects (3) The relationship between handle tables, objects and type objects Ceng

Implementation of Objects (3) The relationship between handle tables, objects and type objects Ceng 334 - Operating Systems 11

The Object Name Space Some typical directories in the object name space Ceng 334

The Object Name Space Some typical directories in the object name space Ceng 334 - Operating Systems 12

Environment Subsystems (1) Various routes taken to implement Win 32 API function calls Ceng

Environment Subsystems (1) Various routes taken to implement Win 32 API function calls Ceng 334 - Operating Systems 13

Environmental Subsystems (2) • Some key windows 2000 files – mode they run in

Environmental Subsystems (2) • Some key windows 2000 files – mode they run in – number of exported function calls – main contents of each file • Calls in win 32 k. sys not formally exported – not called directly Ceng 334 - Operating Systems 14

Processes and Threads (1) Basic concepts used for CPU and resource management Ceng 334

Processes and Threads (1) Basic concepts used for CPU and resource management Ceng 334 - Operating Systems 15

Processes and Threads (2) Relationship between jobs, processes, threads, and fibers Ceng 334 -

Processes and Threads (2) Relationship between jobs, processes, threads, and fibers Ceng 334 - Operating Systems 16

Job, Process, Thread & Fiber Mgmt. API Calls Some of Win 32 calls for

Job, Process, Thread & Fiber Mgmt. API Calls Some of Win 32 calls for managing processes, threads and fibers Ceng 334 - Operating Systems 17

Scheduling (1) Mapping of Win 32 priorities to Windows 2000 priorities Ceng 334 -

Scheduling (1) Mapping of Win 32 priorities to Windows 2000 priorities Ceng 334 - Operating Systems 18

Scheduling (2) Windows 2000 supports 32 priorities for threads Ceng 334 - Operating Systems

Scheduling (2) Windows 2000 supports 32 priorities for threads Ceng 334 - Operating Systems 19

Scheduling (3) An example of priority inversion Ceng 334 - Operating Systems 20

Scheduling (3) An example of priority inversion Ceng 334 - Operating Systems 20

MS-DOS Emulation How old MS-DOS programs are run under Windows 2000 Ceng 334 -

MS-DOS Emulation How old MS-DOS programs are run under Windows 2000 Ceng 334 - Operating Systems 21

Booting Windows 2000 • Processes starting up during boot phase • Those above the

Booting Windows 2000 • Processes starting up during boot phase • Those above the line are always started • Those below are examples of services which could be started Ceng 334 - Operating Systems 22

Fundamental Concepts (1) • Virtual address space layout for 3 user processes • White

Fundamental Concepts (1) • Virtual address space layout for 3 user processes • White areas are private per process • Shaded areas are shared among all processes Ceng 334 - Operating Systems 23

Fundamental Concepts (2) • Mapped regions with their shadow pages on disk • The

Fundamental Concepts (2) • Mapped regions with their shadow pages on disk • The lib. dll file is mapped into two address spaces at same time Ceng 334 - Operating Systems 24

Memory Management System Calls The principal Win 32 API functions for mapping virtual memory

Memory Management System Calls The principal Win 32 API functions for mapping virtual memory in Windows 2000 Ceng 334 - Operating Systems 25

Implementation of Memory Management A page table entry for a mapped page on the

Implementation of Memory Management A page table entry for a mapped page on the Pentium Ceng 334 - Operating Systems 26

Physical Memory Management (1) The various page lists and the transitions between them Ceng

Physical Memory Management (1) The various page lists and the transitions between them Ceng 334 - Operating Systems 27

Physical Memory Management (2) Some of the major fields in the page frame data

Physical Memory Management (2) Some of the major fields in the page frame data base for a valid page Ceng 334 - Operating Systems 28

Input/Output API Calls Categories of Win 32 API calls Ceng 334 - Operating Systems

Input/Output API Calls Categories of Win 32 API calls Ceng 334 - Operating Systems 29

Device Drivers Windows 2000 allows drivers to be stacked Ceng 334 - Operating Systems

Device Drivers Windows 2000 allows drivers to be stacked Ceng 334 - Operating Systems 30

File System API Calls in Windows 2000 (1) • Principle Win 32 API functions

File System API Calls in Windows 2000 (1) • Principle Win 32 API functions for file I/O • Second column gives nearest UNIX equivalent Ceng 334 - Operating Systems 31

File System API Calls in Windows 2000 (2) A program fragment for copying a

File System API Calls in Windows 2000 (2) A program fragment for copying a file using the Windows 2000 API functions Ceng 334 - Operating Systems 32

File System API Calls in Windows 2000 (3) • Principle Win 32 API functions

File System API Calls in Windows 2000 (3) • Principle Win 32 API functions for directory management • Second column gives nearest UNIX equivalent, when one exists Ceng 334 - Operating Systems 33

File System Structure (1) The NTFS master file table Ceng 334 - Operating Systems

File System Structure (1) The NTFS master file table Ceng 334 - Operating Systems 34

File System Structure (2) The attributes used in MFT records Ceng 334 - Operating

File System Structure (2) The attributes used in MFT records Ceng 334 - Operating Systems 35

File System Structure (3) An MFT record for a three-run, nine-block file Ceng 334

File System Structure (3) An MFT record for a three-run, nine-block file Ceng 334 - Operating Systems 36

File System Structure (4) A file that requires three MFT records to store its

File System Structure (4) A file that requires three MFT records to store its runs Ceng 334 - Operating Systems 37

File System Structure (5) The MFT record for a small directory. Ceng 334 -

File System Structure (5) The MFT record for a small directory. Ceng 334 - Operating Systems 38

File Name Lookup Steps in looking up the file C: mariaweb. htm Ceng 334

File Name Lookup Steps in looking up the file C: mariaweb. htm Ceng 334 - Operating Systems 39

File Compression (a) An example of a 48 -block file being compressed to 32

File Compression (a) An example of a 48 -block file being compressed to 32 blocks (b) The MTF record for the file after compression Ceng 334 - Operating Systems 40

File Encryption K retrieved user's public key Operation of the encrypting file system Ceng

File Encryption K retrieved user's public key Operation of the encrypting file system Ceng 334 - Operating Systems 41

Security in Windows 2000 Structure of an access token Ceng 334 - Operating Systems

Security in Windows 2000 Structure of an access token Ceng 334 - Operating Systems 42

Security API Calls (1) Example security descriptor for a file Ceng 334 - Operating

Security API Calls (1) Example security descriptor for a file Ceng 334 - Operating Systems 43

Security API Calls (2) Principal Win 32 API functions for security Ceng 334 -

Security API Calls (2) Principal Win 32 API functions for security Ceng 334 - Operating Systems 44

Caching in Windows 2000 The path through the cache to the hardware Ceng 334

Caching in Windows 2000 The path through the cache to the hardware Ceng 334 - Operating Systems 45