Upload
carmella-brown
View
217
Download
0
Tags:
Embed Size (px)
Citation preview
INSIDE THE OSJanuary 2010Boston Area Windows Server User Group
Tim ManganKahuna, TMurgent Technologies
PART 1
Agenda What is an OS? What is in Microsoft’s OS? CPU Memory Cache New Stuff Hyper-V
Part 2
What Is An Operating System?1. Software that provides an abstraction
of the hardware, and2. Provides a set of services to higher
layers (applications)
HARDWARE
HAL
OPERATING SYSTEM
APPLICATIONSProcess
Thread Thread
MemoryCPU
CPU – Single Threaded OS
instrInstr…InstrRead kbdInstr…If <EOL> Call ProgramJump top
instrInstr…InstrRead kbdInstr…… If not done, Jump return
Instr……EOI
DOS
APPLICATION
Int
Instr…Ret
TSR
Call TSR
Saving CPU Context Interrupt, or Process/Thread swap Current contents of CPU registers,
program counters (current instruction address), etc must be saved (in memory)
Contents are later restored to resume processing
CPU – Multi Tasking OS
instr…InstrCall Task 1Call Task 2Call Task 3Instr…HousekeepingJump top instr
…Complicated stuff….Instr… Yield
Purpose-Built OS
Task 3
instr…Read Port AInstr… Yield
Task 1
Instr……EOI
Int
Non Pre-emptive
instr…Read Port BInstr… Yield
Task 2
1ms
1ms
3ms
CPU – Multi Tasking OS
instrInstr…InstrApp Ready?Instr…Housekeeping…Jump top
instr…InstrRead port…InstrJump
Windows 16-bit
APPLICATION (LP)
instr…InstrMove DataInstr…If not done JumpExit
APPLICATION (HP)
Instr……EOI
Int
Pre-emptive
Swap App?
HARDWARE
HAL
OPERATING SYSTEM
APPLICATIONS
MemoryCPU
ApplicationApplication
Protected Mode Separate OS and Applications into
separate modes CPU support or “run levels” (or “rings”) If not in right level/ring, can’t do some
things Only OS code can change level/ring
HARDWARE
HAL
OPERATING SYSTEM
APPLICATIONS
MemoryCPU
Protected/Real Mode
Ring 0“Kernel Mode” or “Supervisor Mode”
Ring 1“User Mode”
Virtual Memory Decouple Actual RAM from a Managed
View Abstraction Provide different “software entities”
different views
Kernel MemoryOnly Write in Ring Zero
User Memory
Virtual MemoryA page of a virtual memory
may be:In RAMIn Page File Both, Neither
Virtual Memory
RAM PageFile
PFN Database
(Page Table)
Virtual Memory Different Views for Different Processes View typically has unused pages All processes see same kernel mem (but
can’t touch)
Kernel MemoryOnly Write in Ring Zero
User Memory
Physical Memory
Process“A”
Process“B”
OS:MemoryA page of a process memory may be
Private or sharedIn RAM, Page File, both, or neither
In ram
Ram+Page
Paged
Reserved
Virtual MemoryPage Table Mapping
RAM PageFile
Process (virtual) memory spaces
Process “A”
Process “B”
Process “C”
Memory Manager
Microsoft Much of the previous is not really
specific to Microsoft Hardware allows OS’s to Advance
8086 16-bit ,20-bit address space
Dos
80186 New fast instructions
80286 Protected Mode, 24-bit addr
Windows 16-bit
80386 32-bit, 32-bit addr, MMU Paging
Windows 32-bit
80486 FPU, L1 Cache
Pentium 64-bit data bus PAE
P-Pro L2 Cache
P4 64-bit support X64 OS
Xeon,Core 2,…
Hyper-threading, Multi-core
Kernel Mode
Microsoft OS Subsystems
Mem
ory
Su
bsy
stem
User Mode
Cac
he
Su
bsy
stem I/O
Sub
syst
em
FS Drivers
Tas
kE
xecu
tive
Obj
ect
Man
ager
Loc
al P
roce
dure
C
all
Reg
istr
y
Sec
urit
y
Kernel32.dllKernelbase.dll
Filters
Tas
kE
xecu
tive
Task ExecutiveWindows Calculator
Type in 5 digit #,Hit n! (factorial)
Takes Over 24 Hours
Priority ThreadScheduling
Show TM
Priority ThreadScheduling
System Idle (zero page) thread(s)
Idle threads
Below Normal threads
Normal threads
Above Normal threads
High threads
Priority ThreadScheduling
Waiting threads
P8P10 P8 P9P15
INSIDE THE OS