2. Architecture
Windows XP support Layered approach…
User mode – layer closest to the person
Applications that you run (like Word)
Support programs for applications - the Windows XP Subsystems
Kernel mode – layer closest to hardware
Programs that help software running on our system use the computer’s hardware
Device drivers (software interfaces to hardware)
3. Hardware Abstraction Layer (HAL) - allow programmers to write device-independent, high
performance applications by providing standard Operating System (OS) calls to
hardware.
4.
5. Inter-process Communication
Use shared memory and message passing both.
Message-passing via local procedure call (LPC) facility
Local Procedure Call - is an internal, inter-process communication facility provided by
the Microsoft for lightweight IPC between processes on the same computer.
Mailboxes are created for communication for the messages of up to 256 bytes.
Message larger than 256 byte can be sent using Section Object (shared memory).
6. Threads
Implements the one-to-one mapping, kernel-level
Each thread contains a
- thread id
- Register set
- Private data storage area
The register set, stacks, and private storage area are known as the context of the threads.
7. Primary Data Structure of Threads
Kernel level
- ETHREAD (executive thread block)
- KTHREAD (kernel thread block)
User level
- TEB (thread environment block)
8. Scheduling
Windows uses priority-based preemptive scheduling
Highest-priority thread runs next
Thread runs until (1) blocks, (2) uses time slice, (3) preempted by higher-priority thread
Real-time threads can preempt non-real-time
9. Memory Management
Uses demand paging with clustering. Clustering brings in pages surrounding the faulting page
Processes are assigned working set minimum and working set maximum
Working set minimum is the minimum number of pages the process is guaranteed to have in
memory
A process may be assigned as many pages up to its working set maximum
When the amount of free memory in the system falls below a threshold, automatic working set
trimming is performed to restore the amount of free memory
Working set trimming removes pages from processes that have pages in excess of their working
set minimum