1 / 23

Inside the OS

January 2010 Boston Area Windows Server User Group. Inside the OS. Part 1. Tim Mangan Kahuna , TMurgent Technologies. 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?.

vevina
Download Presentation

Inside the OS

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. January 2010 Boston Area Windows Server User Group Inside the OS Part 1 Tim Mangan Kahuna, TMurgent Technologies

  2. Agenda • What is an OS? • What is in Microsoft’s OS? • CPU • Memory • Cache • New Stuff • Hyper-V Part 2

  3. What Is An Operating System? • Software that provides an abstraction of the hardware, and • Provides a set of services to higher layers (applications)

  4. Thread Thread Process Applications Memory Operating System HaL Hardware CPU

  5. CPU – Single Threaded OS DOS instr Instr … Instr Read kbd Instr … If <EOL> Call Program Jump top APPLICATION instr Instr … Instr Read kbd Instr … … If not done, Jump return Int TSR Instr … … EOI Instr … Ret Call TSR

  6. 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

  7. CPU – Multi Tasking OS Task 1 instr … Read Port A Instr … Yield Non Pre-emptive Purpose-Built OS 1ms instr … Instr Call Task 1 Call Task 2 Call Task 3 Instr … Housekeeping Jump top Task 2 instr … Read Port B Instr … Yield 1ms Task 3 instr … Complicated stuff …. Instr … Yield 3ms Int Instr … … EOI

  8. CPU – Multi Tasking OS APPLICATION (LP) Pre-emptive instr … Instr Read port … Instr Jump Windows 16-bit instr Instr … Instr App Ready? Instr … Housekeeping … Jump top APPLICATION (HP) instr … Instr Move Data Instr … If not done Jump Exit Int Instr … … EOI Swap App?

  9. Application Application Applications Memory Operating System HaL Hardware CPU

  10. 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

  11. Protected/Real Mode Applications Ring 1 “User Mode” Memory Operating System Ring 0 “Kernel Mode” or “Supervisor Mode” HaL Hardware CPU

  12. Virtual Memory • Decouple Actual RAM from a Managed View Abstraction • Provide different “software entities” different views User Memory Kernel Memory Only Write in Ring Zero

  13. Virtual Memory A page of a virtual memory may be: In RAM In Page File Both, Neither PFN Database (Page Table) Virtual Memory Page File RAM

  14. Virtual Memory • Different Views for Different Processes • View typically has unused pages • All processes see same kernel mem(but can’t touch) User Memory Kernel Memory Only Write in Ring Zero Process “A” Process “B” Physical Memory

  15. Memory Manager OS:Memory A page of a process memory may be Private or shared In RAM, Page File, both, or neither Process “A” Process “B” Process “C” Virtual Memory Page Table Mapping Page File Process (virtual) memory spaces RAM

  16. Microsoft • Much of the previous is not really specific to Microsoft • Hardware allows OS’s to Advance

  17. Microsoft OS Subsystems User Mode Kernelbase.dll Kernel32.dll Kernel Mode Task Executive Task Executive Memory Subsystem Cache Subsystem Object Manager Local Procedure Call Registry Security I/O Subsystem Filters FS Drivers

  18. Task Executive Windows Calculator Takes Over 24 Hours Type in 5 digit #, Hit n! (factorial)

  19. Priority ThreadScheduling Show TM

  20. Priority ThreadScheduling High threads Above Normal threads Normal threads Below Normal threads Idle threads System Idle (zero page) thread(s)

  21. Priority ThreadScheduling

  22. Waiting threads P8 P15 P8 P9 P10

  23. Inside The OS Tim Mangan tmangan@tmurgent.com www.tmurgent.com

More Related