1 Case Study 2: Windows 2000 Chapter 11 11.1 History of windows 2000 11.2 Programming windows 2000...
-
date post
23-Jan-2016 -
Category
Documents
-
view
215 -
download
0
Transcript of 1 Case Study 2: Windows 2000 Chapter 11 11.1 History of windows 2000 11.2 Programming windows 2000...
![Page 1: 1 Case Study 2: Windows 2000 Chapter 11 11.1 History of windows 2000 11.2 Programming windows 2000 11.3 System structure 11.4 Processes and threads in.](https://reader036.fdocuments.us/reader036/viewer/2022062807/56649d4a5503460f94a27637/html5/thumbnails/1.jpg)
1
Case Study 2: Windows 2000
Chapter 11
11.1 History of windows 2000 11.2 Programming windows 2000 11.3 System structure 11.4 Processes and threads in windows 2000 11.5 Memory management 11.6 Input/output in windows 2000 11.7 The windows 2000 file system 11.8 Security in windows 2000 11.9 Caching in windows 2000
![Page 2: 1 Case Study 2: Windows 2000 Chapter 11 11.1 History of windows 2000 11.2 Programming windows 2000 11.3 System structure 11.4 Processes and threads in.](https://reader036.fdocuments.us/reader036/viewer/2022062807/56649d4a5503460f94a27637/html5/thumbnails/2.jpg)
2
Windows NT
Some differences between Windows 98 and Windows NT
![Page 3: 1 Case Study 2: Windows 2000 Chapter 11 11.1 History of windows 2000 11.2 Programming windows 2000 11.3 System structure 11.4 Processes and threads in.](https://reader036.fdocuments.us/reader036/viewer/2022062807/56649d4a5503460f94a27637/html5/thumbnails/3.jpg)
3
Windows 2000 (1)
Different versions of Windows 2000
![Page 4: 1 Case Study 2: Windows 2000 Chapter 11 11.1 History of windows 2000 11.2 Programming windows 2000 11.3 System structure 11.4 Processes and threads in.](https://reader036.fdocuments.us/reader036/viewer/2022062807/56649d4a5503460f94a27637/html5/thumbnails/4.jpg)
4
Windows 2000 (2)
Comparison of some operating system sizes
![Page 5: 1 Case Study 2: Windows 2000 Chapter 11 11.1 History of windows 2000 11.2 Programming windows 2000 11.3 System structure 11.4 Processes and threads in.](https://reader036.fdocuments.us/reader036/viewer/2022062807/56649d4a5503460f94a27637/html5/thumbnails/5.jpg)
5
The Win32 Application Programming Interface
The Win32 API allows programs to run on almost all versions of Windows
![Page 6: 1 Case Study 2: Windows 2000 Chapter 11 11.1 History of windows 2000 11.2 Programming windows 2000 11.3 System structure 11.4 Processes and threads in.](https://reader036.fdocuments.us/reader036/viewer/2022062807/56649d4a5503460f94a27637/html5/thumbnails/6.jpg)
6
The Registry (1)
• Top level keys and selected subkeys• Capitalization has no meaning but follows Microsoft practice.
![Page 7: 1 Case Study 2: Windows 2000 Chapter 11 11.1 History of windows 2000 11.2 Programming windows 2000 11.3 System structure 11.4 Processes and threads in.](https://reader036.fdocuments.us/reader036/viewer/2022062807/56649d4a5503460f94a27637/html5/thumbnails/7.jpg)
7
The Registry (2)
Some of the Win32 API calls for using the registry
![Page 8: 1 Case Study 2: Windows 2000 Chapter 11 11.1 History of windows 2000 11.2 Programming windows 2000 11.3 System structure 11.4 Processes and threads in.](https://reader036.fdocuments.us/reader036/viewer/2022062807/56649d4a5503460f94a27637/html5/thumbnails/8.jpg)
8
The Operating System Structure
• Structure of Windows 2000 (slightly simplified).• Shaded area is executed• Boxes, D, are device drivers• Service processes are system daemons
![Page 9: 1 Case Study 2: Windows 2000 Chapter 11 11.1 History of windows 2000 11.2 Programming windows 2000 11.3 System structure 11.4 Processes and threads in.](https://reader036.fdocuments.us/reader036/viewer/2022062807/56649d4a5503460f94a27637/html5/thumbnails/9.jpg)
9
Hardware Abstraction Layer
Some of the hardware functions the HAL manages
![Page 10: 1 Case Study 2: Windows 2000 Chapter 11 11.1 History of windows 2000 11.2 Programming windows 2000 11.3 System structure 11.4 Processes and threads in.](https://reader036.fdocuments.us/reader036/viewer/2022062807/56649d4a5503460f94a27637/html5/thumbnails/10.jpg)
10
Implementation of Objects (1)
The structure of an object
![Page 11: 1 Case Study 2: Windows 2000 Chapter 11 11.1 History of windows 2000 11.2 Programming windows 2000 11.3 System structure 11.4 Processes and threads in.](https://reader036.fdocuments.us/reader036/viewer/2022062807/56649d4a5503460f94a27637/html5/thumbnails/11.jpg)
11
Implementation of Objects (2)
Some common executive object types managed by the object manager
![Page 12: 1 Case Study 2: Windows 2000 Chapter 11 11.1 History of windows 2000 11.2 Programming windows 2000 11.3 System structure 11.4 Processes and threads in.](https://reader036.fdocuments.us/reader036/viewer/2022062807/56649d4a5503460f94a27637/html5/thumbnails/12.jpg)
12
Implementation of Objects (3)
The relationship between handle tables, objects and type objects
![Page 13: 1 Case Study 2: Windows 2000 Chapter 11 11.1 History of windows 2000 11.2 Programming windows 2000 11.3 System structure 11.4 Processes and threads in.](https://reader036.fdocuments.us/reader036/viewer/2022062807/56649d4a5503460f94a27637/html5/thumbnails/13.jpg)
13
The Object Name Space
Some typical directories in the object name space
![Page 14: 1 Case Study 2: Windows 2000 Chapter 11 11.1 History of windows 2000 11.2 Programming windows 2000 11.3 System structure 11.4 Processes and threads in.](https://reader036.fdocuments.us/reader036/viewer/2022062807/56649d4a5503460f94a27637/html5/thumbnails/14.jpg)
14
Environment Subsystems (1)
Various routes taken to implement Win32 API function calls
![Page 15: 1 Case Study 2: Windows 2000 Chapter 11 11.1 History of windows 2000 11.2 Programming windows 2000 11.3 System structure 11.4 Processes and threads in.](https://reader036.fdocuments.us/reader036/viewer/2022062807/56649d4a5503460f94a27637/html5/thumbnails/15.jpg)
15
Environmental Subsystems (2)
• Some key windows 2000 files– mode they run in– number of exported function calls– main contents of each file
• Calls in win32k.sys not formally exported– not called directly
![Page 16: 1 Case Study 2: Windows 2000 Chapter 11 11.1 History of windows 2000 11.2 Programming windows 2000 11.3 System structure 11.4 Processes and threads in.](https://reader036.fdocuments.us/reader036/viewer/2022062807/56649d4a5503460f94a27637/html5/thumbnails/16.jpg)
16
Processes and Threads (1)
Basic concepts used for CPU and resource management
![Page 17: 1 Case Study 2: Windows 2000 Chapter 11 11.1 History of windows 2000 11.2 Programming windows 2000 11.3 System structure 11.4 Processes and threads in.](https://reader036.fdocuments.us/reader036/viewer/2022062807/56649d4a5503460f94a27637/html5/thumbnails/17.jpg)
17
Processes and Threads (2)
Relationship between jobs, processes, threads, and fibers
![Page 18: 1 Case Study 2: Windows 2000 Chapter 11 11.1 History of windows 2000 11.2 Programming windows 2000 11.3 System structure 11.4 Processes and threads in.](https://reader036.fdocuments.us/reader036/viewer/2022062807/56649d4a5503460f94a27637/html5/thumbnails/18.jpg)
18
Job, Process, Thread & Fiber Mgmt. API Calls
Some of Win32 calls for managing processes, threads and fibers
![Page 19: 1 Case Study 2: Windows 2000 Chapter 11 11.1 History of windows 2000 11.2 Programming windows 2000 11.3 System structure 11.4 Processes and threads in.](https://reader036.fdocuments.us/reader036/viewer/2022062807/56649d4a5503460f94a27637/html5/thumbnails/19.jpg)
19
Scheduling (1)
Mapping of Win32 priorities to Windows 2000 priorities
![Page 20: 1 Case Study 2: Windows 2000 Chapter 11 11.1 History of windows 2000 11.2 Programming windows 2000 11.3 System structure 11.4 Processes and threads in.](https://reader036.fdocuments.us/reader036/viewer/2022062807/56649d4a5503460f94a27637/html5/thumbnails/20.jpg)
20
Scheduling (2)
Windows 2000 supports 32 priorities for threads
![Page 21: 1 Case Study 2: Windows 2000 Chapter 11 11.1 History of windows 2000 11.2 Programming windows 2000 11.3 System structure 11.4 Processes and threads in.](https://reader036.fdocuments.us/reader036/viewer/2022062807/56649d4a5503460f94a27637/html5/thumbnails/21.jpg)
21
An example of priority inversion
Scheduling (3)
![Page 22: 1 Case Study 2: Windows 2000 Chapter 11 11.1 History of windows 2000 11.2 Programming windows 2000 11.3 System structure 11.4 Processes and threads in.](https://reader036.fdocuments.us/reader036/viewer/2022062807/56649d4a5503460f94a27637/html5/thumbnails/22.jpg)
22
MS-DOS Emulation
How old MS-DOS programs are run under Windows 2000
![Page 23: 1 Case Study 2: Windows 2000 Chapter 11 11.1 History of windows 2000 11.2 Programming windows 2000 11.3 System structure 11.4 Processes and threads in.](https://reader036.fdocuments.us/reader036/viewer/2022062807/56649d4a5503460f94a27637/html5/thumbnails/23.jpg)
23
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
![Page 24: 1 Case Study 2: Windows 2000 Chapter 11 11.1 History of windows 2000 11.2 Programming windows 2000 11.3 System structure 11.4 Processes and threads in.](https://reader036.fdocuments.us/reader036/viewer/2022062807/56649d4a5503460f94a27637/html5/thumbnails/24.jpg)
24
Fundamental Concepts (1)
• Virtual address space layout for 3 user processes• White areas are private per process• Shaded areas are shared among all processes
![Page 25: 1 Case Study 2: Windows 2000 Chapter 11 11.1 History of windows 2000 11.2 Programming windows 2000 11.3 System structure 11.4 Processes and threads in.](https://reader036.fdocuments.us/reader036/viewer/2022062807/56649d4a5503460f94a27637/html5/thumbnails/25.jpg)
25
Fundamental Concepts (2)
• Mapped regions with their shadow pages on disk• The lib.dll file is mapped into two address spaces at same time
![Page 26: 1 Case Study 2: Windows 2000 Chapter 11 11.1 History of windows 2000 11.2 Programming windows 2000 11.3 System structure 11.4 Processes and threads in.](https://reader036.fdocuments.us/reader036/viewer/2022062807/56649d4a5503460f94a27637/html5/thumbnails/26.jpg)
26
Memory Management System Calls
The principal Win32 API functions for mapping virtual memory in Windows 2000
![Page 27: 1 Case Study 2: Windows 2000 Chapter 11 11.1 History of windows 2000 11.2 Programming windows 2000 11.3 System structure 11.4 Processes and threads in.](https://reader036.fdocuments.us/reader036/viewer/2022062807/56649d4a5503460f94a27637/html5/thumbnails/27.jpg)
27
Implementation of Memory Management
A page table entry for a mapped page on the Pentium
![Page 28: 1 Case Study 2: Windows 2000 Chapter 11 11.1 History of windows 2000 11.2 Programming windows 2000 11.3 System structure 11.4 Processes and threads in.](https://reader036.fdocuments.us/reader036/viewer/2022062807/56649d4a5503460f94a27637/html5/thumbnails/28.jpg)
28
Physical Memory Management (1)
The various page lists and the transitions between them
![Page 29: 1 Case Study 2: Windows 2000 Chapter 11 11.1 History of windows 2000 11.2 Programming windows 2000 11.3 System structure 11.4 Processes and threads in.](https://reader036.fdocuments.us/reader036/viewer/2022062807/56649d4a5503460f94a27637/html5/thumbnails/29.jpg)
29
Physical Memory Management (2)
Some of the major fields in the page frame data base for a valid page
![Page 30: 1 Case Study 2: Windows 2000 Chapter 11 11.1 History of windows 2000 11.2 Programming windows 2000 11.3 System structure 11.4 Processes and threads in.](https://reader036.fdocuments.us/reader036/viewer/2022062807/56649d4a5503460f94a27637/html5/thumbnails/30.jpg)
30
Input/Output API Calls
Categories of Win32 API calls
![Page 31: 1 Case Study 2: Windows 2000 Chapter 11 11.1 History of windows 2000 11.2 Programming windows 2000 11.3 System structure 11.4 Processes and threads in.](https://reader036.fdocuments.us/reader036/viewer/2022062807/56649d4a5503460f94a27637/html5/thumbnails/31.jpg)
31
Device Drivers
Windows 2000 allows drivers to be stacked
![Page 32: 1 Case Study 2: Windows 2000 Chapter 11 11.1 History of windows 2000 11.2 Programming windows 2000 11.3 System structure 11.4 Processes and threads in.](https://reader036.fdocuments.us/reader036/viewer/2022062807/56649d4a5503460f94a27637/html5/thumbnails/32.jpg)
32
File System API Calls in Windows 2000 (1)
• Principle Win32 API functions for file I/O
• Second column gives nearest UNIX equivalent
![Page 33: 1 Case Study 2: Windows 2000 Chapter 11 11.1 History of windows 2000 11.2 Programming windows 2000 11.3 System structure 11.4 Processes and threads in.](https://reader036.fdocuments.us/reader036/viewer/2022062807/56649d4a5503460f94a27637/html5/thumbnails/33.jpg)
33
File System API Calls in Windows 2000 (2)
A program fragment for copying a file using the Windows 2000 API functions
![Page 34: 1 Case Study 2: Windows 2000 Chapter 11 11.1 History of windows 2000 11.2 Programming windows 2000 11.3 System structure 11.4 Processes and threads in.](https://reader036.fdocuments.us/reader036/viewer/2022062807/56649d4a5503460f94a27637/html5/thumbnails/34.jpg)
34
File System API Calls in Windows 2000 (3)
• Principle Win32 API functions for directory management• Second column gives nearest UNIX equivalent, when one exists
![Page 35: 1 Case Study 2: Windows 2000 Chapter 11 11.1 History of windows 2000 11.2 Programming windows 2000 11.3 System structure 11.4 Processes and threads in.](https://reader036.fdocuments.us/reader036/viewer/2022062807/56649d4a5503460f94a27637/html5/thumbnails/35.jpg)
35
File System Structure (1)
The NTFS master file table
![Page 36: 1 Case Study 2: Windows 2000 Chapter 11 11.1 History of windows 2000 11.2 Programming windows 2000 11.3 System structure 11.4 Processes and threads in.](https://reader036.fdocuments.us/reader036/viewer/2022062807/56649d4a5503460f94a27637/html5/thumbnails/36.jpg)
36
File System Structure (2)
The attributes used in MFT records
![Page 37: 1 Case Study 2: Windows 2000 Chapter 11 11.1 History of windows 2000 11.2 Programming windows 2000 11.3 System structure 11.4 Processes and threads in.](https://reader036.fdocuments.us/reader036/viewer/2022062807/56649d4a5503460f94a27637/html5/thumbnails/37.jpg)
37
File System Structure (3)
An MFT record for a three-run, nine-block file
![Page 38: 1 Case Study 2: Windows 2000 Chapter 11 11.1 History of windows 2000 11.2 Programming windows 2000 11.3 System structure 11.4 Processes and threads in.](https://reader036.fdocuments.us/reader036/viewer/2022062807/56649d4a5503460f94a27637/html5/thumbnails/38.jpg)
38
File System Structure (4)
A file that requires three MFT records to store its runs
![Page 39: 1 Case Study 2: Windows 2000 Chapter 11 11.1 History of windows 2000 11.2 Programming windows 2000 11.3 System structure 11.4 Processes and threads in.](https://reader036.fdocuments.us/reader036/viewer/2022062807/56649d4a5503460f94a27637/html5/thumbnails/39.jpg)
39
File System Structure (5)
The MFT record for a small directory.
![Page 40: 1 Case Study 2: Windows 2000 Chapter 11 11.1 History of windows 2000 11.2 Programming windows 2000 11.3 System structure 11.4 Processes and threads in.](https://reader036.fdocuments.us/reader036/viewer/2022062807/56649d4a5503460f94a27637/html5/thumbnails/40.jpg)
40
File Name Lookup
Steps in looking up the file C:mariaweb.htm
![Page 41: 1 Case Study 2: Windows 2000 Chapter 11 11.1 History of windows 2000 11.2 Programming windows 2000 11.3 System structure 11.4 Processes and threads in.](https://reader036.fdocuments.us/reader036/viewer/2022062807/56649d4a5503460f94a27637/html5/thumbnails/41.jpg)
41
File Compression
(a) An example of a 48-block file being compressed to 32 blocks(b) The MTF record for the file after compression
![Page 42: 1 Case Study 2: Windows 2000 Chapter 11 11.1 History of windows 2000 11.2 Programming windows 2000 11.3 System structure 11.4 Processes and threads in.](https://reader036.fdocuments.us/reader036/viewer/2022062807/56649d4a5503460f94a27637/html5/thumbnails/42.jpg)
42
File Encryption
Operation of the encrypting file system
K retrieved
user's public key
![Page 43: 1 Case Study 2: Windows 2000 Chapter 11 11.1 History of windows 2000 11.2 Programming windows 2000 11.3 System structure 11.4 Processes and threads in.](https://reader036.fdocuments.us/reader036/viewer/2022062807/56649d4a5503460f94a27637/html5/thumbnails/43.jpg)
43
Security in Windows 2000
Structure of an access token
![Page 44: 1 Case Study 2: Windows 2000 Chapter 11 11.1 History of windows 2000 11.2 Programming windows 2000 11.3 System structure 11.4 Processes and threads in.](https://reader036.fdocuments.us/reader036/viewer/2022062807/56649d4a5503460f94a27637/html5/thumbnails/44.jpg)
44
Security API Calls (1)
Example security descriptor for a file
![Page 45: 1 Case Study 2: Windows 2000 Chapter 11 11.1 History of windows 2000 11.2 Programming windows 2000 11.3 System structure 11.4 Processes and threads in.](https://reader036.fdocuments.us/reader036/viewer/2022062807/56649d4a5503460f94a27637/html5/thumbnails/45.jpg)
45
Security API Calls (2)
Principal Win32 API functions for security
![Page 46: 1 Case Study 2: Windows 2000 Chapter 11 11.1 History of windows 2000 11.2 Programming windows 2000 11.3 System structure 11.4 Processes and threads in.](https://reader036.fdocuments.us/reader036/viewer/2022062807/56649d4a5503460f94a27637/html5/thumbnails/46.jpg)
46
Caching in Windows 2000
The path through the cache to the hardware