Document Sample
Windows Powered By Docstoc
					    Ch. 21.1-21.5: Windows 2000
•   32-bit addresses; 4K page size
•   Preemptive multitasking
•   Intel Pentium & later
•   Successor to Windows NT
•   Written in C, C++ (about 30 million lines program code)
•   Goals:
    – portability (POSIX), security, multiprocessor support,
      extensibility, international language support,
      MSDOS/Windows compatiblity
    – commercial
• “the layered architecture of the system … makes it
  so easy to use” [my italics, p. 743, text]
          Win NT/Win 2000
• Win NT 4.0
  – Some user interface routines & graphics code
    shifted into kernel
  – Increased performance, but decreased reliability
• Win 2000
  – Microkernel architecture
  – Similarities with Mach system
           System Components
• Microkernel: Executes in protected mode
   – Executive
   – HAL: Hardware abstraction layer
      • Some device independence
      • Device drivers can still work directly with hardware though
   – Kernel: core for executive & subsystems
      • Never paged out
• User mode processes
   – Environmental subsystems
      • User mode operating systems
          – OS/2, Win16, Win32, MSDOS, POSIX
      • Logon systems
   – User applications
             Processes & Threads
• Processes
  –   Virtual memory address space
  –   Base priority
  –   “affinity” (assignment) to one or more processors
  –   One or more threads
• Threads
  – Units of execution; dispatched by kernel
  – States: ready, standby, running, waiting, transition,
  – 32 priority levels; each has a queue
       • Variable class: 0-15
       • Real-time: 16-31
    CPU Scheduling Algorithm
• Scheduler traverses from highest (numbered) to
  lowest (numbered) priority queues
   – Round robin, combined with priority scheme
• When thread’s time quantum runs out
   – Returned to queue, in ready state
   – Variable class: priority lowered
• When variable priority thread released from wait
   – Dispatcher boosts priority, depending on type of wait
      • High boost: waiting for keyboard I/O
      • Low boost: waiting for disk I/O
• Client/server model (like Mach)
   – “Local procedure call” (LPC) facility
   – Message passing within a single computer
   – Used to implement system calls and other message
• Server
   – Publishes a globally visible connection port object
• Client
   – Opens a handle to server connection port
      • Sends connection request
   – Server creates channel & returns handle to client
   – Channel: pair of private communication ports
      • Client-to-server
      • Server-to-client
• Some specifics dependent on message sizes
           Process Manager:
         Example of Messaging
• Application (e.g., Win32 app) calls CreateProcess
   – Message sent to Win32 environmental subsystem
• Win32 sends a message
   – to process manager in executive to create a process
   – object handle returned to Win32 from executive
• Win32 sends message
   – to process manager in executive again
   – This time, to create a thread for process
• Win32 replies to Win32 app with a message
  containing handles for thread and process objects
               Virtual Memory
• Upper 1-2 GB of all processes
   – Used by operating system in kernel mode
• Clustering
   – bring in neighboring pages on a page fault
• Max/min working set size per process
   – Processes have initial working set size of 30 frames
• When # free frames drops below a certain value
   – FIFO page replacement
   – Victimize processes with more frames than their
       Ch. 21.4: Windows 2000
      Environmental Subsystems
• Win32
  – Provides all keyboard, mouse, graphical display
       • Other environmental subsystems use this
  – Separate processes with own input queues
• VDM: Virtual DOS Machine (DOS 5.0)
  –   Emulates Intel 486 instructions
  –   Routines to emulate DOS ROM BIOS
  –   Virtual device drivers: Screen, keyboard, comm. Ports
  –   Partial support only: No direct h/w access
• 16-Bit windows (“Windows on Windows”)
  – Windows 3.1 kernel & stub routines for window
    manager & GDI
  – Conversion of 16 bit addresses into 32 bit
  Environmental Subsystems - 2
• POSIX (UNIX model)
  – POSIX.1
• OS/2 – character based apps only
• Logon/Security
  – Generates access tokens to represent users
  – Uses authentication package (e.g., db lookup)
Ch. 21.5:Windows 2000 File System
 • Goals: data recovery, security, fault tolerance,
   large file & file system sizes, multiple data
   streams, UNICODE names, copmression
 • Cluster: Unit of disk allocation; power of two size
    – E.g., 4KB cluster with disks > 4GB
 • File: Structured object comprised of attributes
    – Attribute
         • independent byte stream
         • Standard attributes: name, creation time, security descriptor
 • MFT: Master file table
    –   One or more records per file
    –   describes attributes of file
    –   Resident attributes: small sized; stored in MFT record
    –   Nonresident attributes: stored in extents on disk
 • Directories: particular kinds of files; B+ tree rep’n

Shared By: