Professional Documents
Culture Documents
CH 22
CH 22
History
Design Principles
System Components
Environmental Subsystems
File system
Networking
Programmer Interface
Operating System Concepts – 7th Edition, Feb 6, 2005 22.2 Silberschatz, Galvin and Gagne ©2005
Objectives
Operating System Concepts – 7th Edition, Feb 6, 2005 22.3 Silberschatz, Galvin and Gagne ©2005
Windows XP
Operating System Concepts – 7th Edition, Feb 6, 2005 22.4 Silberschatz, Galvin and Gagne ©2005
History
Operating System Concepts – 7th Edition, Feb 6, 2005 22.5 Silberschatz, Galvin and Gagne ©2005
Design Principles
Operating System Concepts – 7th Edition, Feb 6, 2005 22.6 Silberschatz, Galvin and Gagne ©2005
Design Principles (Cont.)
Operating System Concepts – 7th Edition, Feb 6, 2005 22.7 Silberschatz, Galvin and Gagne ©2005
XP Architecture
Operating System Concepts – 7th Edition, Feb 6, 2005 22.8 Silberschatz, Galvin and Gagne ©2005
Depiction of XP Architecture
Operating System Concepts – 7th Edition, Feb 6, 2005 22.9 Silberschatz, Galvin and Gagne ©2005
System Components — Kernel
Operating System Concepts – 7th Edition, Feb 6, 2005 22.10 Silberschatz, Galvin and Gagne ©2005
Kernel — Process and Threads
Operating System Concepts – 7th Edition, Feb 6, 2005 22.11 Silberschatz, Galvin and Gagne ©2005
Kernel — Scheduling
Operating System Concepts – 7th Edition, Feb 6, 2005 22.12 Silberschatz, Galvin and Gagne ©2005
Kernel — Scheduling (Cont.)
Operating System Concepts – 7th Edition, Feb 6, 2005 22.13 Silberschatz, Galvin and Gagne ©2005
Windows XP Interrupt Request Levels
Operating System Concepts – 7th Edition, Feb 6, 2005 22.14 Silberschatz, Galvin and Gagne ©2005
Kernel — Trap Handling
Operating System Concepts – 7th Edition, Feb 6, 2005 22.15 Silberschatz, Galvin and Gagne ©2005
Executive — Object Manager
XP uses objects for all its services and entities; the object manger
supervises the use of all the objects
z Generates an object handle
z Checks security
z Keeps track of which processes are using each object
Objects are manipulated by a standard set of methods, namely
create, open, close, delete, query name, parse and
security
Operating System Concepts – 7th Edition, Feb 6, 2005 22.16 Silberschatz, Galvin and Gagne ©2005
Executive — Naming Objects
Operating System Concepts – 7th Edition, Feb 6, 2005 22.17 Silberschatz, Galvin and Gagne ©2005
Executive — Virtual Memory Manager
Operating System Concepts – 7th Edition, Feb 6, 2005 22.18 Silberschatz, Galvin and Gagne ©2005
Virtual-Memory Layout
Operating System Concepts – 7th Edition, Feb 6, 2005 22.19 Silberschatz, Galvin and Gagne ©2005
Virtual Memory Manager (Cont.)
Operating System Concepts – 7th Edition, Feb 6, 2005 22.20 Silberschatz, Galvin and Gagne ©2005
Virtual-to-Physical Address Translation
Operating System Concepts – 7th Edition, Feb 6, 2005 22.21 Silberschatz, Galvin and Gagne ©2005
Page File Page-Table Entry
Operating System Concepts – 7th Edition, Feb 6, 2005 22.22 Silberschatz, Galvin and Gagne ©2005
Executive — Process Manager
Operating System Concepts – 7th Edition, Feb 6, 2005 22.23 Silberschatz, Galvin and Gagne ©2005
Executive — Local Procedure Call Facility
The LPC passes requests and results between client and server
processes within a single machine.
In particular, it is used to request services from the various XP
subsystems.
When a LPC channel is created, one of three types of message
passing techniques must be specified.
z First type is suitable for small messages, up to 256 bytes; port's
message queue is used as intermediate storage, and the
messages are copied from one process to the other.
z Second type avoids copying large messages by pointing to a
shared memory section object created for the channel.
z Third method, called quick LPC was used by graphical display
portions of the Win32 subsystem.
Operating System Concepts – 7th Edition, Feb 6, 2005 22.24 Silberschatz, Galvin and Gagne ©2005
Executive — I/O Manager
Operating System Concepts – 7th Edition, Feb 6, 2005 22.25 Silberschatz, Galvin and Gagne ©2005
File I/O
Operating System Concepts – 7th Edition, Feb 6, 2005 22.26 Silberschatz, Galvin and Gagne ©2005
Executive — Security Reference Monitor
Operating System Concepts – 7th Edition, Feb 6, 2005 22.27 Silberschatz, Galvin and Gagne ©2005
Executive – Plug-and-Play Manager
When new devices are added (for example, PCI or USB), the PnP
manager loads the appropriate driver
Operating System Concepts – 7th Edition, Feb 6, 2005 22.28 Silberschatz, Galvin and Gagne ©2005
Environmental Subsystems
Operating System Concepts – 7th Edition, Feb 6, 2005 22.29 Silberschatz, Galvin and Gagne ©2005
Environmental Subsystems (Cont.)
Operating System Concepts – 7th Edition, Feb 6, 2005 22.30 Silberschatz, Galvin and Gagne ©2005
Environmental Subsystems (Cont.)
Operating System Concepts – 7th Edition, Feb 6, 2005 22.31 Silberschatz, Galvin and Gagne ©2005
File System
Operating System Concepts – 7th Edition, Feb 6, 2005 22.32 Silberschatz, Galvin and Gagne ©2005
File System — Internal Layout
Operating System Concepts – 7th Edition, Feb 6, 2005 22.33 Silberschatz, Galvin and Gagne ©2005
File System — Recovery
Operating System Concepts – 7th Edition, Feb 6, 2005 22.34 Silberschatz, Galvin and Gagne ©2005
File System — Recovery (Cont.)
This scheme does not guarantee that all the user file data can be
recovered after a crash, just that the file system data structures (the
metadata files) are undamaged and reflect some consistent state
prior to the crash
The log is stored in the third metadata file at the beginning of the
volume
Operating System Concepts – 7th Edition, Feb 6, 2005 22.35 Silberschatz, Galvin and Gagne ©2005
File System — Security
Each file object has a security descriptor attribute stored in this MFT
record
This attribute contains the access token of the owner of the file, and
an access control list that states the access privileges that are
granted to each user that has access to the file
Operating System Concepts – 7th Edition, Feb 6, 2005 22.36 Silberschatz, Galvin and Gagne ©2005
Volume Management and Fault Tolerance
FtDisk, the fault tolerant disk driver for XP, provides several ways to
combine multiple SCSI disk drives into one logical volume
Logically concatenate multiple disks to form a large logical volume, a
volume set
Interleave multiple physical partitions in round-robin fashion to form a
stripe set (also called RAID level 0, or “disk striping”)
z Variation: stripe set with parity, or RAID level 5
Disk mirroring, or RAID level 1, is a robust scheme that uses a mirror
set — two equally sized partitions on tow disks with identical data
contents
To deal with disk sectors that go bad, FtDisk, uses a hardware
technique called sector sparing and NTFS uses a software technique
called cluster remapping
Operating System Concepts – 7th Edition, Feb 6, 2005 22.37 Silberschatz, Galvin and Gagne ©2005
Volume Set On Two Drives
Operating System Concepts – 7th Edition, Feb 6, 2005 22.38 Silberschatz, Galvin and Gagne ©2005
Stripe Set on Two Drives
Operating System Concepts – 7th Edition, Feb 6, 2005 22.39 Silberschatz, Galvin and Gagne ©2005
Stripe Set With Parity on Three Drives
Operating System Concepts – 7th Edition, Feb 6, 2005 22.40 Silberschatz, Galvin and Gagne ©2005
Mirror Set on Two Drives
Operating System Concepts – 7th Edition, Feb 6, 2005 22.41 Silberschatz, Galvin and Gagne ©2005
File System — Compression
To compress a file, NTFS divides the file’s data into compression units,
which are blocks of 16 contiguous clusters
Operating System Concepts – 7th Edition, Feb 6, 2005 22.42 Silberschatz, Galvin and Gagne ©2005
File System — Reparse Points
A reparse point returns an error code when accessed. The reparse data
tells the I/O manager what to do next
Reparse points can also be used to access files that have been moved
to offline storage
Operating System Concepts – 7th Edition, Feb 6, 2005 22.43 Silberschatz, Galvin and Gagne ©2005
Networking
Operating System Concepts – 7th Edition, Feb 6, 2005 22.44 Silberschatz, Galvin and Gagne ©2005
Networking — Protocols
Operating System Concepts – 7th Edition, Feb 6, 2005 22.45 Silberschatz, Galvin and Gagne ©2005
Networking — Protocols (Cont.)
Operating System Concepts – 7th Edition, Feb 6, 2005 22.46 Silberschatz, Galvin and Gagne ©2005
Networking — Protocols (Cont.)
Operating System Concepts – 7th Edition, Feb 6, 2005 22.47 Silberschatz, Galvin and Gagne ©2005
Networking — Dist. Processing Mechanisms
Operating System Concepts – 7th Edition, Feb 6, 2005 22.48 Silberschatz, Galvin and Gagne ©2005
Distributed Processing Mechanisms (Cont.)
Operating System Concepts – 7th Edition, Feb 6, 2005 22.49 Silberschatz, Galvin and Gagne ©2005
Networking — Redirectors and Servers
Operating System Concepts – 7th Edition, Feb 6, 2005 22.50 Silberschatz, Galvin and Gagne ©2005
Access to a Remote File
The application calls the I/O manager to request that a file be opened
(we assume that the file name is in the standard UNC format)
The I/O manager builds an I/O request packet
The I/O manager recognizes that the access is for a remote file, and
calls a driver called a Multiple Universal Naming Convention Provider
(MUP)
The MUP sends the I/O request packet asynchronously to all
registered redirectors
A redirector that can satisfy the request responds to the MUP
z To avoid asking all the redirectors the same question in the future, the
MUP uses a cache to remember with redirector can handle this file
Operating System Concepts – 7th Edition, Feb 6, 2005 22.51 Silberschatz, Galvin and Gagne ©2005
Access to a Remote File (Cont.)
Operating System Concepts – 7th Edition, Feb 6, 2005 22.52 Silberschatz, Galvin and Gagne ©2005
Networking — Domains
Operating System Concepts – 7th Edition, Feb 6, 2005 22.53 Silberschatz, Galvin and Gagne ©2005
Name Resolution in TCP/IP Networks
Operating System Concepts – 7th Edition, Feb 6, 2005 22.54 Silberschatz, Galvin and Gagne ©2005
Name Resolution (Cont.)
Operating System Concepts – 7th Edition, Feb 6, 2005 22.55 Silberschatz, Galvin and Gagne ©2005
Programmer Interface — Access to Kernel Obj.
Operating System Concepts – 7th Edition, Feb 6, 2005 22.56 Silberschatz, Galvin and Gagne ©2005
Programmer Interface — Process Management
Operating System Concepts – 7th Edition, Feb 6, 2005 22.57 Silberschatz, Galvin and Gagne ©2005
Process Management (Cont.)
Operating System Concepts – 7th Edition, Feb 6, 2005 22.58 Silberschatz, Galvin and Gagne ©2005
Process Management (Cont.)
Operating System Concepts – 7th Edition, Feb 6, 2005 22.59 Silberschatz, Galvin and Gagne ©2005
Process Management (Cont.)
Operating System Concepts – 7th Edition, Feb 6, 2005 22.60 Silberschatz, Galvin and Gagne ©2005
Programmer Interface — Interprocess Comm.
Operating System Concepts – 7th Edition, Feb 6, 2005 22.61 Silberschatz, Galvin and Gagne ©2005
Programmer Interface — Memory Management
Virtual memory:
z VirtualAlloc reserves or commits virtual memory
z VirtualFree decommits or releases the memory
z These functions enable the application to determine the
virtual address at which the memory is allocated
Operating System Concepts – 7th Edition, Feb 6, 2005 22.62 Silberschatz, Galvin and Gagne ©2005
Memory Management (Cont.)
Operating System Concepts – 7th Edition, Feb 6, 2005 22.63 Silberschatz, Galvin and Gagne ©2005
End of Chapter 22